Closed
Bug 1309664
Opened 9 years ago
Closed 9 years ago
js::ZoneGlobalsAreAllGray should not call UnmarkGray()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla52
| Tracking | Status | |
|---|---|---|
| firefox52 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file, 1 obsolete file)
This method iterates over all compartments in a zone, and checks if all of the zone globals are gray, in order to do a special CC optimization. I think due to some of the unmark gray barrier work, this now ends up calling UnmarkGray on the global, which is obviously a bad idea.
One way to fix this would be to add a globalIsMarkedGray() method to JSCompartment that does not do the unmarkgray. I'm not sure what the right way to do that, as JSCompartment::global_ has the odd type js::ReadBarrieredGlobalObject. I don't know what other read barriers the GC might need.
| Assignee | ||
Comment 1•9 years ago
|
||
This at least works well enough to run XPConnect mochitests.
| Assignee | ||
Comment 2•9 years ago
|
||
Do you know if this read barriered global thing does anything aside from unmark gray? From reading the code I can't really tell. It was added in bug 1024250.
Flags: needinfo?(jcoppeard)
Comment 3•9 years ago
|
||
There's nothing else going on. The global isn't going to escape or anything, so I think the indirection of globalIsMarkedGray is unnecessary. r=me on a patch where ZoneGlobalsAreAllGray just calls unsafeUnbarrieredMaybeGlobal directly. I'm not even sure why the scary "unsafe" is needed on that name, but never mind that.
Flags: needinfo?(jcoppeard)
| Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Steve Fink [:sfink] [:s:] from comment #3)
> There's nothing else going on. The global isn't going to escape or anything,
> so I think the indirection of globalIsMarkedGray is unnecessary.
I guess that's true. I was just trying to encapsulate things a little more in case of future change, but I suppose it is clear enough why you want to avoid the barrier.
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 6•9 years ago
|
||
No need to test on try, as we conveniently never run this code right now.
Assignee: nobody → continuation
Comment 7•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8800402 [details]
Bug 1309664 - Don't unmark gray globals in ZoneGlobalsAreAllGray.
https://reviewboard.mozilla.org/r/85316/#review83900
Attachment #8800402 -
Flags: review?(sphink) → review+
| Assignee | ||
Updated•9 years ago
|
Attachment #8800359 -
Attachment is obsolete: true
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31de330b852f
Don't unmark gray globals in ZoneGlobalsAreAllGray. r=sfink
Comment 9•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•