mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 825379 - Fix JSContext::findVersion to work with Ion frames. r=dvander
This commit is contained in:
parent
f2db080d4c
commit
022b77f0ba
8
js/src/jit-test/tests/bug825379.js
Normal file
8
js/src/jit-test/tests/bug825379.js
Normal file
@ -0,0 +1,8 @@
|
||||
x = this
|
||||
y = {}
|
||||
y.v = "";
|
||||
[0, 0].forEach(function() {
|
||||
for (p in y) {
|
||||
x.eval("function f(){yield e}")
|
||||
}
|
||||
});
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user