Permalink
Browse files

v8 changed its api for query interceptor, no way to get true property…

… accessor privileges so just returning none
  • Loading branch information...
1 parent d456a4e commit f51beb2e1479cfe591e8bcd3346da884d89dd454 @bmeck committed Oct 28, 2010
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/proxy.js
  2. +4 −4 src/watchable.cc
View
@@ -1,4 +1,4 @@
-var Overload=require("overload");
+var Overload=require("./overload");
var Watchable=Overload.Watchable;
var RePrototype=Overload.RePrototype;
module.exports = {
View
@@ -231,7 +231,7 @@ Handle<Array> WatchableIndexedPropertyEnumerator(
return scope.Close(Array::New());
}
}
-Handle<Boolean> WatchableIndexedPropertyQuery(
+Handle<Integer> WatchableIndexedPropertyQuery(
uint32_t index
, const AccessorInfo& info
) {
@@ -242,7 +242,7 @@ Handle<Boolean> WatchableIndexedPropertyQuery(
//Default
Handle<Value> data = callbacks->GetInternalField(2);
if(data->IsNull()) {
- return scope.Close(False());
+ return scope.Close(Handle<Integer>());
}
//Set up arguments
Handle<Object> args=WatchableArgs(info.Holder(),info.This());
@@ -253,7 +253,7 @@ Handle<Boolean> WatchableIndexedPropertyQuery(
Handle<Function> callback = Handle<Function>::Cast(data);
Handle<Value> new_value = callback->Call(info.This(),1,values);
//Return value is the return of the function call
- return scope.Close(Boolean::New(new_value->IsTrue()));
+ return scope.Close(new_value->IsTrue() ? Handle<Integer>() : Integer::New(0));
}
Handle<Boolean> WatchableIndexedPropertyDeleter(
@@ -440,4 +440,4 @@ Handle<Value> RePrototype(const Arguments& args) {
// else {
// return scope.Close(ThrowException(Exception::Error(String::New("Argument must be a function"))));
// }
-//}
+//}

0 comments on commit f51beb2

Please sign in to comment.