зеркало из https://github.com/mozilla/pjs.git
Bug 662836: Don't require JS_EvaluateUCScriptInStackFrame to be able to extend call objects that the bytecode compiler didn't expect to be extensible. r=dvander
This commit is contained in:
Родитель
1a82b8abb6
Коммит
05667edeb7
|
@ -5,10 +5,11 @@ function callee() {
|
|||
assertJit();
|
||||
evalInFrame(1, "var x = 'success'");
|
||||
}
|
||||
function caller() {
|
||||
function caller(code) {
|
||||
assertJit();
|
||||
eval(code);
|
||||
callee();
|
||||
return x;
|
||||
}
|
||||
assertEq(caller(), "success");
|
||||
assertEq(caller('var y = "ignominy"'), "success");
|
||||
assertEq(typeof x, "undefined");
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
setDebug(true);
|
||||
|
||||
this.__defineGetter__("someProperty", function () { evalInFrame(1, "var x = 'success'"); });
|
||||
function caller(obj) {
|
||||
function caller(code, obj) {
|
||||
assertJit();
|
||||
eval(code); // Make the compiler give up on binding analysis.
|
||||
obj.someProperty;
|
||||
return x;
|
||||
}
|
||||
assertEq(caller(this), "success");
|
||||
assertEq(caller("var y = 'ignominy'", this), "success");
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// |jit-test| mjitalways;debug
|
||||
setDebug(true);
|
||||
|
||||
function callee() {
|
||||
assertJit();
|
||||
evalInFrame(1, "var x = 'success'");
|
||||
}
|
||||
callee();
|
||||
assertEq(x, "success");
|
|
@ -2,9 +2,10 @@
|
|||
setDebug(true);
|
||||
|
||||
function nop(){}
|
||||
function caller(obj) {
|
||||
function caller(code, obj) {
|
||||
assertJit();
|
||||
eval(code); // Make the compiler give up on binding analysis.
|
||||
return x;
|
||||
}
|
||||
trap(caller, 7, "var x = 'success'; nop()");
|
||||
assertEq(caller(this), "success");
|
||||
assertEq(caller("var y = 'ignominy'", this), "success");
|
||||
|
|
Загрузка…
Ссылка в новой задаче