Bug 825379 - Fix JSContext::findVersion to work with Ion frames. r=dvander

This commit is contained in:
Jan de Mooij 2013-01-26 16:40:06 +01:00
parent f2db080d4c
commit 022b77f0ba
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,8 @@
x = this
y = {}
y.v = "";
[0, 0].forEach(function() {
for (p in y) {
x.eval("function f(){yield e}")
}
});

View File

@ -463,8 +463,8 @@ JSContext::findVersion() const
if (hasVersionOverride)
return versionOverride;
if (stack.hasfp())
return fp()->script()->getVersion();
if (JSScript *script = stack.currentScript(NULL, js::ContextStack::ALLOW_CROSS_COMPARTMENT))
return script->getVersion();
return defaultVersion;
}