Skip to content

Commit

Permalink
Bug 1820602 - Add test and comment. r=iain
Browse files Browse the repository at this point in the history
Depends on D171836

Differential Revision: https://phabricator.services.mozilla.com/D171837

UltraBlame original commit: ce69715cc73d6d870844c58a5fd1fafc51f60e7c
  • Loading branch information
marco-c committed May 31, 2023
1 parent 9ba1e96 commit 4d3b2e3
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 0 deletions.
154 changes: 154 additions & 0 deletions js/src/jit-test/tests/ion/bug1820602.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
let
domObject
=
new
FakeDOMObject
(
)
;
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
)
;
global1
.
domObj
=
domObject
;
global1
.
evaluate
(
"
(
"
+
function
f
(
)
{
var
domObjNormal
=
new
FakeDOMObject
(
)
;
for
(
var
i
=
0
;
i
<
5000
;
i
+
+
)
{
var
obj
=
i
<
1500
?
domObjNormal
:
domObj
;
assertEq
(
obj
.
doFoo
(
4
5
)
2
)
;
}
}
.
toString
(
)
+
"
)
(
)
"
)
;
16 changes: 16 additions & 0 deletions js/src/jit/CacheIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71031,6 +71031,22 @@ the
right
instance
.
This
also
/
/
ensures
DOM_OBJECT_SLOT
is
stored
in
a
fixed
slot
.
See
CanAttachDOMCall
.
writer
.
guardShape
Expand Down

0 comments on commit 4d3b2e3

Please sign in to comment.