зеркало из https://github.com/mozilla/gecko-dev.git
Always use the target object, regardless of where a method property is found along the prototype chain.
This commit is contained in:
Родитель
8558f071a4
Коммит
c337fff76a
|
@ -493,12 +493,13 @@ JSValue Context::interpret(ICodeModule* iCode, const JSValues& args)
|
|||
JSValue base;
|
||||
JSValue prop;
|
||||
if (op2(call).first == NotARegister) {
|
||||
base = mGlobal->getReference(prop, *((*registers)[op3(call).first].string));
|
||||
base = mGlobal;
|
||||
prop = mGlobal->getProperty(*((*registers)[op3(call).first].string));
|
||||
}
|
||||
else {
|
||||
base = (*registers)[op2(call).first];
|
||||
ASSERT(base.tag == JSValue::object_tag); // XXX runtime error
|
||||
base = base.object->getReference(prop, *((*registers)[op3(call).first].string));
|
||||
prop = base.object->getProperty(*((*registers)[op3(call).first].string));
|
||||
}
|
||||
ASSERT(prop.isFunction()); // XXX runtime error
|
||||
JSFunction *target = prop.function;
|
||||
|
|
|
@ -493,12 +493,13 @@ JSValue Context::interpret(ICodeModule* iCode, const JSValues& args)
|
|||
JSValue base;
|
||||
JSValue prop;
|
||||
if (op2(call).first == NotARegister) {
|
||||
base = mGlobal->getReference(prop, *((*registers)[op3(call).first].string));
|
||||
base = mGlobal;
|
||||
prop = mGlobal->getProperty(*((*registers)[op3(call).first].string));
|
||||
}
|
||||
else {
|
||||
base = (*registers)[op2(call).first];
|
||||
ASSERT(base.tag == JSValue::object_tag); // XXX runtime error
|
||||
base = base.object->getReference(prop, *((*registers)[op3(call).first].string));
|
||||
prop = base.object->getProperty(*((*registers)[op3(call).first].string));
|
||||
}
|
||||
ASSERT(prop.isFunction()); // XXX runtime error
|
||||
JSFunction *target = prop.function;
|
||||
|
|
Загрузка…
Ссылка в новой задаче