Always use the target object, regardless of where a method property is found along the prototype chain.

This commit is contained in:
beard%netscape.com 2000-06-24 05:21:49 +00:00
Родитель 8558f071a4
Коммит c337fff76a
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -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;