diff --git a/js/src/jit-test/tests/jaeger/recompile/bug645044.js b/js/src/jit-test/tests/jaeger/recompile/bug645044.js new file mode 100644 index 00000000000..e31762a8e6a --- /dev/null +++ b/js/src/jit-test/tests/jaeger/recompile/bug645044.js @@ -0,0 +1,4 @@ + +this.__defineGetter__("x", gc); +x.__proto__ = this; +__proto__ = 44; diff --git a/js/src/jsinfer.cpp b/js/src/jsinfer.cpp index d86b2fa76e2..9b9f501a67d 100644 --- a/js/src/jsinfer.cpp +++ b/js/src/jsinfer.cpp @@ -839,13 +839,6 @@ PropertyAccess(JSContext *cx, JSScript *script, const jsbytecode *pc, TypeObject { JS_ASSERT_IF(!target, assign); - /* Reads from objects with unknown properties are unknown, writes to such objects are ignored. */ - if (object->unknownProperties) { - if (!assign) - target->addType(cx, TYPE_UNKNOWN); - return; - } - /* Monitor assigns on the 'prototype' property. */ if (assign && id == id_prototype(cx)) { cx->compartment->types.monitorBytecode(cx, script, pc - script->code); @@ -861,6 +854,13 @@ PropertyAccess(JSContext *cx, JSScript *script, const jsbytecode *pc, TypeObject return; } + /* Reads from objects with unknown properties are unknown, writes to such objects are ignored. */ + if (object->unknownProperties) { + if (!assign) + target->addType(cx, TYPE_UNKNOWN); + return; + } + /* Capture the effects of a standard property access. */ if (target) { TypeSet *types = object->getProperty(cx, id, assign);