diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/ion/bug1808352.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bug1808352.js b/js/src/jit-test/tests/ion/bug1808352.js new file mode 100644 index 0000000000..d106165f43 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1808352.js @@ -0,0 +1,27 @@ +let domObject = new FakeDOMObject(); +let expectedValue = domObject.x; + +let {object, transplant} = transplantableObject({object: domObject}); +assertEq(object, domObject); + +let global1 = newGlobal({newCompartment: true}); +let global2 = newGlobal({newCompartment: true}); + +transplant(global1); +transplant(global2); +transplant(global1); + +assertEq(object, domObject); +assertEq(domObject.x, expectedValue); + +global1.domObj = domObject; +global1.expectedValue = expectedValue; + +global1.evaluate(` +function f() { + for (var i = 0; i < 2000; i++) { + assertEq(domObj.x, expectedValue); + } +} +f(); +`); |