Closed Bug 740185 Opened 14 years ago Closed 14 years ago

Mark safe JS context black

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

(Whiteboard: [snappy])

Attachments

(1 file, 1 obsolete file)

This is kept alive for the lifetime of the browser, and adds 100 or so nodes to the CC graph.
I was trying to avoid adding code to nsContentUtils, but that would have required exposing the definition of nsIThreadJSContextStack to nsCCUncollectableMarker, which seems to be a somewhat private XPConnect class.
Assignee: nobody → continuation
Attached patch fix if bracesSplinter Review
Attachment #610356 - Attachment is obsolete: true
Attachment #610368 - Flags: review?(bugs)
Whiteboard: [snappy]
Comment on attachment 610368 [details] [diff] [review] fix if braces >+nsContentUtils::TraceSafeJSContext(JSTracer *aTrc) >+{ >+ if (!sThreadJSContextStack) { >+ return; >+ } >+ JSContext* cx = nsnull; >+ sThreadJSContextStack->GetSafeJSContext(&cx); >+ if (!cx) { >+ return; >+ } >+ if (JSObject *global = JS_GetGlobalObject(cx)) { >+ JS_CALL_OBJECT_TRACER(aTrc, global, "safe context"); >+ } Nit, you're not consistent with *. JSContext* but JSObject * I prefer JSContext*
Attachment #610368 - Flags: review?(bugs) → review+
Good point. I'm bad about that. I changed them all to Foo*. https://hg.mozilla.org/integration/mozilla-inbound/rev/2a60f2559489
Target Milestone: --- → mozilla14
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: