Bug 862380 - Silently fail for enumerate-like operations on XOWs. r=mrbkap

This commit is contained in:
Bobby Holley 2013-05-22 22:27:15 -06:00
parent 4b3957c0bc
commit 66cef80cfe

View File

@ -75,6 +75,9 @@ struct CrossOriginAccessiblePropertiesOnly : public Policy {
return AccessCheck::isCrossOriginAccessPermitted(cx, wrapper, id, act);
}
static bool deny(js::Wrapper::Action act, JSHandleId id) {
// Silently fail for enumerate-like operations.
if (act == js::Wrapper::GET && id == JS::JSID_VOIDHANDLE)
return true;
return false;
}
static bool allowNativeCall(JSContext *cx, JS::IsAcceptableThis test, JS::NativeImpl impl)