Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 740185 - Mark safe JS context black
: Mark safe JS context black
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Andrew McCreight [:mccr8]
: Andrew Overholt [:overholt]
Depends on:
Blocks: 716598 722715
  Show dependency treegraph
Reported: 2012-03-28 15:53 PDT by Andrew McCreight [:mccr8]
Modified: 2012-03-31 15:11 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

add marker to nsContentUtils, use it (2.75 KB, patch)
2012-03-28 16:22 PDT, Andrew McCreight [:mccr8]
no flags Details | Diff | Splinter Review
fix if braces (2.79 KB, patch)
2012-03-28 17:18 PDT, Andrew McCreight [:mccr8]
bugs: review+
Details | Diff | Splinter Review

Description Andrew McCreight [:mccr8] 2012-03-28 15:53:02 PDT
This is kept alive for the lifetime of the browser, and adds 100 or so nodes to the CC graph.
Comment 1 Andrew McCreight [:mccr8] 2012-03-28 16:22:15 PDT
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.
Comment 2 Andrew McCreight [:mccr8] 2012-03-28 17:18:25 PDT
Created attachment 610368 [details] [diff] [review]
fix if braces
Comment 3 Andrew McCreight [:mccr8] 2012-03-29 10:55:58 PDT
Comment on attachment 610368 [details] [diff] [review]
fix if braces

Try run looked good
Comment 4 Olli Pettay [:smaug] (reviewing overload, queue closed for a day or two) 2012-03-30 09:02:22 PDT
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*
Comment 5 Andrew McCreight [:mccr8] 2012-03-30 10:24:05 PDT
Good point.  I'm bad about that.  I changed them all to Foo*.
Comment 6 Andrew McCreight [:mccr8] 2012-03-31 15:11:45 PDT

Note You need to log in before you can comment on or make changes to this bug.