diff --git a/js/xpconnect/wrappers/AccessCheck.h b/js/xpconnect/wrappers/AccessCheck.h index 277a6a3fe57f..aed93de5ec8a 100644 --- a/js/xpconnect/wrappers/AccessCheck.h +++ b/js/xpconnect/wrappers/AccessCheck.h @@ -39,7 +39,7 @@ struct Opaque : public Policy { static bool check(JSContext *cx, JSObject *wrapper, jsid id, js::Wrapper::Action act) { return act == js::Wrapper::CALL; } - static bool deny(js::Wrapper::Action act) { + static bool deny(js::Wrapper::Action act, JSHandleId id) { return false; } static bool allowNativeCall(JSContext *cx, JS::IsAcceptableThis test, JS::NativeImpl impl) @@ -54,7 +54,7 @@ struct GentlyOpaque : public Policy { static bool check(JSContext *cx, JSObject *wrapper, jsid id, js::Wrapper::Action act) { return false; } - static bool deny(js::Wrapper::Action act) { + static bool deny(js::Wrapper::Action act, JSHandleId id) { return true; } static bool allowNativeCall(JSContext *cx, JS::IsAcceptableThis test, JS::NativeImpl impl) @@ -74,7 +74,7 @@ struct CrossOriginAccessiblePropertiesOnly : public Policy { static bool check(JSContext *cx, JSObject *wrapper, jsid id, js::Wrapper::Action act) { return AccessCheck::isCrossOriginAccessPermitted(cx, wrapper, id, act); } - static bool deny(js::Wrapper::Action act) { + static bool deny(js::Wrapper::Action act, JSHandleId id) { return false; } static bool allowNativeCall(JSContext *cx, JS::IsAcceptableThis test, JS::NativeImpl impl) @@ -88,7 +88,7 @@ struct CrossOriginAccessiblePropertiesOnly : public Policy { struct ExposedPropertiesOnly : public Policy { static bool check(JSContext *cx, JSObject *wrapper, jsid id, js::Wrapper::Action act); - static bool deny(js::Wrapper::Action act) { + static bool deny(js::Wrapper::Action act, JSHandleId id) { // Fail silently for GETs. return act == js::Wrapper::GET; } @@ -99,7 +99,7 @@ struct ExposedPropertiesOnly : public Policy { struct ComponentsObjectPolicy : public Policy { static bool check(JSContext *cx, JSObject *wrapper, jsid id, js::Wrapper::Action act); - static bool deny(js::Wrapper::Action act) { + static bool deny(js::Wrapper::Action act, JSHandleId id) { return false; } static bool allowNativeCall(JSContext *cx, JS::IsAcceptableThis test, JS::NativeImpl impl) { diff --git a/js/xpconnect/wrappers/FilteringWrapper.cpp b/js/xpconnect/wrappers/FilteringWrapper.cpp index 29c21e891986..d649231b4397 100644 --- a/js/xpconnect/wrappers/FilteringWrapper.cpp +++ b/js/xpconnect/wrappers/FilteringWrapper.cpp @@ -183,7 +183,7 @@ FilteringWrapper::enter(JSContext *cx, HandleObject wrapper, return true; } if (!Policy::check(cx, wrapper, id, act)) { - *bp = JS_IsExceptionPending(cx) ? false : Policy::deny(act); + *bp = JS_IsExceptionPending(cx) ? false : Policy::deny(act, id); return false; } *bp = true;