mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Look up .prototype on right object when monitoring NEW, bug 621126.
This commit is contained in:
parent
5b9156630b
commit
01a2274ce4
7
js/src/jit-test/tests/basic/testNewWithClone.js
Normal file
7
js/src/jit-test/tests/basic/testNewWithClone.js
Normal file
@ -0,0 +1,7 @@
|
||||
with({}) {
|
||||
function f() {
|
||||
this.foo = "bar";
|
||||
}
|
||||
o = new f();
|
||||
assertEq(o.foo, "bar");
|
||||
}
|
@ -397,7 +397,8 @@ JSContext::typeMonitorCall(JSScript *caller, const jsbytecode *callerpc,
|
||||
|
||||
if (constructing) {
|
||||
js::Value protov;
|
||||
if (!callee->getProperty(this, ATOM_TO_JSID(runtime->atomState.classPrototypeAtom), &protov))
|
||||
jsid id = ATOM_TO_JSID(runtime->atomState.classPrototypeAtom);
|
||||
if (!args.callee().toObject().getProperty(this, id, &protov))
|
||||
return; /* :FIXME: */
|
||||
if (protov.isObject()) {
|
||||
js::types::TypeObject *otype = protov.toObject().getNewType(this);
|
||||
|
Loading…
Reference in New Issue
Block a user