Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 749128 - Make sure to have JSContext before creating TabChildGlobal
: Make sure to have JSContext before creating TabChildGlobal
Product: Core
Classification: Components
Component: IPC (show other bugs)
: 12 Branch
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug]
: Bill McCloskey (:billm)
Depends on:
Blocks: 749018
  Show dependency treegraph
Reported: 2012-04-26 03:29 PDT by Olli Pettay [:smaug]
Modified: 2012-04-26 13:58 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (2.50 KB, patch)
2012-04-26 03:33 PDT, Olli Pettay [:smaug]
jst: review+
justin.lebar+bug: feedback+
Details | Diff | Splinter Review
patch (2.56 KB, patch)
2012-04-26 13:56 PDT, Olli Pettay [:smaug]
no flags Details | Diff | Splinter Review

Description Olli Pettay [:smaug] 2012-04-26 03:29:30 PDT

Comment 1 Olli Pettay [:smaug] 2012-04-26 03:33:04 PDT
Created attachment 618605 [details] [diff] [review]

this shouldn't be terribly bad bug, since without the context safejscontext
is used for JSON message creation.
Comment 2 Olli Pettay [:smaug] 2012-04-26 03:34:20 PDT
...but I want to fix the assertion mention in bug 749018
Comment 3 Justin Lebar (not reading bugmail) 2012-04-26 08:34:14 PDT
Comment on attachment 618605 [details] [diff] [review]

This looks fine to me, but I don't feel comfortable reviewing this code.
Comment 4 Justin Lebar (not reading bugmail) 2012-04-26 09:01:21 PDT
This fixes my assertion, so I'm happy.
Comment 5 Johnny Stenback (:jst, 2012-04-26 13:51:05 PDT
Comment on attachment 618605 [details] [diff] [review]

- In TabChildGlobal::Init()

   mMessageManager = new nsFrameMessageManager(false,
-                                              aTabChild->GetJSContext());
+                                              mTabChild->GetJSContext());

Should we assert here that this is not called more than once?

r=jst either way.
Comment 6 Olli Pettay [:smaug] 2012-04-26 13:51:49 PDT
I can add an assert
Comment 7 Olli Pettay [:smaug] 2012-04-26 13:56:28 PDT
Created attachment 618793 [details] [diff] [review]
Comment 8 Olli Pettay [:smaug] 2012-04-26 13:58:30 PDT

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