Closed
Bug 660783
Opened 13 years ago
Closed 13 years ago
dom workers should not assert about non-main thread during GC marking
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
1.48 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
For parallel marking from bug 638660 we need to make sure that all JSClass::trace hooks can be called from multiple threads and tolerate parallel execution for the same object. Yet the hook implementation in dpm/src/treads insists that the calling thread is the main thread. AFAICS the assert can be removed as the GC graph traversal in dom/src/threads is stateless.
Assignee | ||
Comment 1•13 years ago
|
||
The patch removes the assert under the assumption that nsDOMWorkerMessageHandler::Trace is stateless.
Assignee: general → igor
Attachment #536271 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 2•13 years ago
|
||
Ben: nsDOMWorker::Trace only mark its collection if the worker is not cancelled. As this mayleaves a live object with finalized GC things reachable via collections, it require care when accessing those. So why not to call nsDOMWorkerMessageHandler::Trace there unconditionally?
(In reply to comment #2) > Ben: nsDOMWorker::Trace only mark its collection if the worker is not > cancelled. As this mayleaves a live object with finalized GC things > reachable via collections, it require care when accessing those. So why not > to call nsDOMWorkerMessageHandler::Trace there unconditionally? I'm not sure... It might have been to prevent some type of cyclical leak in the past (all of these objects are very cyclical). In any case it's safe to have finalized gcthings in the collection as long as the canceled flag is set since we will never attempt to use them once canceled. All of this code has changed in bug 649537 (and Trace is threadsafe there) so I'd rather not change anything here but remove the assertion.
Updated•13 years ago
|
Attachment #536271 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 4•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/a4a11ea5646c
Whiteboard: fixed-in-tracemonkey
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/a4a11ea5646c
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•