зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1268955: Include test; r=Waldo
This commit is contained in:
Родитель
e9d584a553
Коммит
735aa6820c
|
@ -0,0 +1,20 @@
|
|||
// |jit-test| test-also-noasmjs
|
||||
|
||||
var scope = {};
|
||||
scope.mod = eval(`"use strict"; (function() { "use asm"; function f() {} return f; });`);
|
||||
|
||||
scope.fun = scope.mod();
|
||||
|
||||
var caught = false;
|
||||
for (let callee of ['mod', 'fun']) {
|
||||
for (let getter of ['caller', 'arguments']) {
|
||||
caught = false;
|
||||
try {
|
||||
scope[callee][getter];
|
||||
} catch (e) {
|
||||
caught = true;
|
||||
assertEq(e instanceof TypeError, true);
|
||||
}
|
||||
assertEq(caught, true);
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче