mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 891980 - IonMonkey: Allow lookupGeneric on fun_resolve hooked objects. (r=Waldo)
This commit is contained in:
parent
b900c31f5d
commit
995f07efa9
@ -5362,7 +5362,8 @@ CanEffectlesslyCallLookupGenericOnObject(JSContext *cx, JSObject *obj, jsid id)
|
||||
return false;
|
||||
if (obj->nativeLookup(cx, id))
|
||||
return true;
|
||||
if (obj->getClass()->resolve != JS_ResolveStub)
|
||||
if (obj->getClass()->resolve != JS_ResolveStub &&
|
||||
obj->getClass()->resolve != (JSResolveOp)fun_resolve)
|
||||
return false;
|
||||
obj = obj->getProto();
|
||||
}
|
||||
|
@ -235,9 +235,9 @@ ResolveInterpretedFunctionPrototype(JSContext *cx, HandleObject obj)
|
||||
return proto;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
fun_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
|
||||
MutableHandleObject objp)
|
||||
JSBool
|
||||
js::fun_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
|
||||
MutableHandleObject objp)
|
||||
{
|
||||
if (!JSID_IS_ATOM(id))
|
||||
return true;
|
||||
@ -498,7 +498,7 @@ Class JSFunction::class_ = {
|
||||
JS_PropertyStub, /* getProperty */
|
||||
JS_StrictPropertyStub, /* setProperty */
|
||||
fun_enumerate,
|
||||
(JSResolveOp)fun_resolve,
|
||||
(JSResolveOp)js::fun_resolve,
|
||||
JS_ConvertStub,
|
||||
NULL, /* finalize */
|
||||
NULL, /* checkAccess */
|
||||
@ -1774,7 +1774,7 @@ JSObject::hasIdempotentProtoChain() const
|
||||
return false;
|
||||
|
||||
JSResolveOp resolve = obj->getClass()->resolve;
|
||||
if (resolve != JS_ResolveStub && resolve != (JSResolveOp) fun_resolve)
|
||||
if (resolve != JS_ResolveStub && resolve != (JSResolveOp) js::fun_resolve)
|
||||
return false;
|
||||
|
||||
if (obj->getOps()->lookupProperty || obj->getOps()->lookupGeneric || obj->getOps()->lookupElement)
|
||||
|
@ -409,6 +409,10 @@ DefineFunction(JSContext *cx, HandleObject obj, HandleId id, JSNative native,
|
||||
gc::AllocKind allocKind = JSFunction::FinalizeKind,
|
||||
NewObjectKind newKind = GenericObject);
|
||||
|
||||
extern JSBool
|
||||
fun_resolve(JSContext *cx, js::HandleObject obj, js::HandleId id,
|
||||
unsigned flags, js::MutableHandleObject objp);
|
||||
|
||||
// ES6 9.2.5 IsConstructor
|
||||
bool IsConstructor(const Value &v);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user