The default bug view has changed. See this FAQ.

Mark safe JS context black

RESOLVED FIXED in mozilla14

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

(Blocks: 2 bugs)

Trunk
mozilla14
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [snappy])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
This is kept alive for the lifetime of the browser, and adds 100 or so nodes to the CC graph.
(Assignee)

Comment 1

5 years ago
Created attachment 610356 [details] [diff] [review]
add marker to nsContentUtils, use it

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
(Assignee)

Comment 2

5 years ago
Created attachment 610368 [details] [diff] [review]
fix if braces
Attachment #610356 - Attachment is obsolete: true
(Assignee)

Comment 3

5 years ago
Comment on attachment 610368 [details] [diff] [review]
fix if braces

Try run looked good https://tbpl.mozilla.org/?tree=Try&rev=c9baf630c73c
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+
(Assignee)

Comment 5

5 years ago
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
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/2a60f2559489
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.