4 https://bugzilla.mozilla.org/show_bug.cgi?id=1863543
8 <title>Test for Bug
1863543</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1863543">Mozilla Bug
1863543</a>
17 // Test for JIT IC guards for missing properties on the HTMLDocument DOM proxy.
18 function testMissingProps() {
20 var docProto
= Object
.getPrototypeOf(doc
);
22 for (var i
= 0; i
< 30; i
++) {
24 // Add shadowing expando property.
25 doc
.unusedPropName1
= 12;
28 // Add prototype property.
29 docProto
.unusedPropName2
= 34;
32 // Add shadowing element.
33 var el
= document
.createElement("object");
34 el
.id
= "unusedPropName3";
35 document
.body
.appendChild(el
);
37 var v1
= doc
.unusedPropName1
;
38 var v2
= doc
.unusedPropName2
;
39 var v3
= doc
.unusedPropName3
;
40 is(v1
, i
>= 15 ? 12 : undefined);
41 is(v2
, i
>= 20 ? 34 : undefined);
42 is(v3
, i
>= 25 ? el
: undefined);