Closed
Bug 548215
Opened 14 years ago
Closed 2 years ago
Don't support finalization by the embedding before JSGC_FINALIZE_END state
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: gal, Unassigned)
Details
Attachments
(4 obsolete files)
For API compatibility we supported this using a pretty sketchy hack in jsgc.cpp. This is in the way of weak pointer support (i.e. ephemeron tables). I will update mdc when this patch lands and notify the mailing list. I doubt anyone else really uses these hooks though.
Reporter | ||
Comment 1•14 years ago
|
||
Assignee: general → gal
Reporter | ||
Updated•14 years ago
|
Attachment #428659 -
Flags: review?(igor)
Comment 3•14 years ago
|
||
The patch should also restrict the usage of JS_IsAboutToFinalized (the public API) to make sure that it is only called after the marking phase is completed. That would require to update the xpconnect code.
Reporter | ||
Comment 4•14 years ago
|
||
#3 is a good idea. I can add a debug assert for that.
Updated•14 years ago
|
Attachment #428659 -
Flags: review?(igor)
Reporter | ||
Comment 5•14 years ago
|
||
Attachment #428659 -
Attachment is obsolete: true
Reporter | ||
Comment 6•14 years ago
|
||
Attachment #428784 -
Attachment is obsolete: true
Reporter | ||
Updated•14 years ago
|
Attachment #428788 -
Flags: review?(igor)
Comment 7•14 years ago
|
||
Comment on attachment 428788 [details] [diff] [review] patch > /* >+ * Allow the embedding to do some additional marking. >+ */ >+ if (rt->gcCallback) >+ (void) rt->gcCallback(cx, JSGC_MARK); >+ >+ /* > * Mark children of things that caused too deep recursion during the above > * tracing. > */ > MarkDelayedChildren(&trc); > This still is not right. MarkDelayedChildren should be called before JSGC_MARK so the cycle collector callback can see all the marked objects. A solution for that could be to drop JSGC_MARK, make MarkDelayedChildren a friend function and call it before JSGC_MARK_END and explicitly in the cycle collector.
Updated•14 years ago
|
Attachment #428788 -
Flags: review?(igor)
Reporter | ||
Updated•14 years ago
|
Attachment #428788 -
Attachment is obsolete: true
Reporter | ||
Comment 8•14 years ago
|
||
I don't think this patch is needed any more for my work, so I will let go of this. I still think the API should be cleaned up.
Assignee: gal → general
No longer blocks: WeakMap
Reporter | ||
Updated•14 years ago
|
Severity: normal → enhancement
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 9•6 years ago
|
||
Moving to p3 because no activity for at least 1 year(s). See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•