]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/is-undefined-jettison-on-masquerader.js
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / tests / stress / is-undefined-jettison-on-masquerader.js
CommitLineData
81345200
A
1function foo(o) {
2 return typeof o === "undefined";
3}
4
5noInline(foo);
6
7function test(o, expected) {
8 var result = foo(o);
9 if (result != expected)
10 throw new Error("bad result: " + result);
11}
12
13for (var i = 0; i < 10000; ++i) {
14 test(void 0, true);
15 test(null, false);
16 test(42, false);
17 test({}, false);
18 test("undefined", false);
19}
20
21test(makeMasquerader(), true);