mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 957688 - Remove side-effect-y call to js::CheckAccess, and remove js::CheckAccess itself. r=mrbkap
Thankfully, this case was only taking the JSACC_PROTO, which is significantly simpler than the alternative.
This commit is contained in:
parent
3bf47f1f26
commit
abb3c5c1c7
@ -82,14 +82,11 @@ ProtoGetterImpl(JSContext *cx, CallArgs args)
|
||||
if (thisv.isPrimitive() && !BoxNonStrictThis(cx, args))
|
||||
return false;
|
||||
|
||||
unsigned dummy;
|
||||
RootedObject obj(cx, &args.thisv().toObject());
|
||||
RootedId nid(cx, NameToId(cx->names().proto));
|
||||
RootedValue v(cx);
|
||||
if (!CheckAccess(cx, obj, nid, JSACC_PROTO, &v, &dummy))
|
||||
RootedObject proto(cx);
|
||||
if (!JSObject::getProto(cx, obj, &proto))
|
||||
return false;
|
||||
|
||||
args.rval().set(v);
|
||||
args.rval().setObjectOrNull(proto);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user