Bug 963641 - Tests for __proto__ in object literals with jsreflect and asm.js module export objects. r=jorendorff

--HG--
extra : rebase_source : cc570fcbc018618079843df2d07f87bbf30f18a7
This commit is contained in:
Jeff Walden 2014-01-27 21:39:58 -08:00
parent 357d670c46
commit 7636ef8c84
2 changed files with 12 additions and 0 deletions

View File

@ -75,6 +75,7 @@ assertEq(exp.f(), 3);
assertEq(Object.keys(exp).join(), 'f');
assertAsmTypeFail(USE_ASM + "function f() { return 3 } return {1:f}");
assertAsmTypeFail(USE_ASM + "function f() { return 3 } return {__proto__:f}");
assertAsmTypeFail(USE_ASM + "function f() { return 3 } return {get x() {} }");
var exp = asmLink(asmCompile(USE_ASM + 'function internal() { return ((g()|0)+2)|0 } function f() { return 1 } function g() { return 2 } function h() { return internal()|0 } return {f:f,g1:g,h1:h}'));

View File

@ -0,0 +1,11 @@
// |reftest| skip-if(!xulRuntime.shell)
// bug 963641
Reflect.parse("({ __proto__: null });");
if (typeof reportCompare === "function")
reportCompare(true, true);
print("Tests complete");