Skip to content

Commit f51beb2

Browse files
committed
v8 changed its api for query interceptor, no way to get true property accessor privileges so just returning none
1 parent d456a4e commit f51beb2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/proxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var Overload=require("overload");
1+
var Overload=require("./overload");
22
var Watchable=Overload.Watchable;
33
var RePrototype=Overload.RePrototype;
44
module.exports = {

src/watchable.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Handle<Array> WatchableIndexedPropertyEnumerator(
231231
return scope.Close(Array::New());
232232
}
233233
}
234-
Handle<Boolean> WatchableIndexedPropertyQuery(
234+
Handle<Integer> WatchableIndexedPropertyQuery(
235235
uint32_t index
236236
, const AccessorInfo& info
237237
) {
@@ -242,7 +242,7 @@ Handle<Boolean> WatchableIndexedPropertyQuery(
242242
//Default
243243
Handle<Value> data = callbacks->GetInternalField(2);
244244
if(data->IsNull()) {
245-
return scope.Close(False());
245+
return scope.Close(Handle<Integer>());
246246
}
247247
//Set up arguments
248248
Handle<Object> args=WatchableArgs(info.Holder(),info.This());
@@ -253,7 +253,7 @@ Handle<Boolean> WatchableIndexedPropertyQuery(
253253
Handle<Function> callback = Handle<Function>::Cast(data);
254254
Handle<Value> new_value = callback->Call(info.This(),1,values);
255255
//Return value is the return of the function call
256-
return scope.Close(Boolean::New(new_value->IsTrue()));
256+
return scope.Close(new_value->IsTrue() ? Handle<Integer>() : Integer::New(0));
257257
}
258258

259259
Handle<Boolean> WatchableIndexedPropertyDeleter(
@@ -440,4 +440,4 @@ Handle<Value> RePrototype(const Arguments& args) {
440440
// else {
441441
// return scope.Close(ThrowException(Exception::Error(String::New("Argument must be a function"))));
442442
// }
443-
//}
443+
//}

0 commit comments

Comments
 (0)