Closed Bug 1247381 Opened 8 years ago Closed 8 years ago

Replace a ! that got dropped in bug 1105069 part 7

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox44 --- wontfix
firefox45 --- wontfix
firefox46 --- wontfix
firefox47 --- fixed
firefox-esr45 --- wontfix

People

(Reporter: terrence, Assigned: terrence)

Details

Attachments

(1 file)

Andrew discovered in bug 1246720 that I had accidentally dropped a ! when converting weak tracing to GCCellPtrs as part of bug 1105069, part 7.

http://hg.mozilla.org/mozilla-central/rev/aa2a54fffd77

I think that this means we will simply not visit weakmap values, so we will not see cycles if they are behind a weakmap and not held live elsewhere. If the thing is not held live elsewhere, then I think it is probably not participating in cycles unless the thing is also the key of the weakmap elsewhere? It's hard to tell what the severity is here, so I am going to file as sec-high and suggest uplift to all branches.
Attachment #8718038 - Flags: review?(continuation)
This only affects weak map values that are not AddToCCKind(), but that hold onto CCed things. I don't know how common that is. Looking at the definition of TraceKind, it seems like only Symbol is something that could end up there, at least for content JS:

https://dxr.mozilla.org/mozilla-central/source/js/public/TraceKind.h?case=true&from=TraceKind#34

I guess debugger stuff uses C++ weak maps, and might put scripts or something in there.
Attachment #8718038 - Flags: review?(continuation) → review+
After discussion on IRC: Value can only hold JSObject, JSString, and JS::Symbol, so there is no security issue here, just a performance issue.
Group: core-security
https://hg.mozilla.org/mozilla-central/rev/d563945a38a8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: