Last Comment Bug 749128 - Make sure to have JSContext before creating TabChildGlobal
: Make sure to have JSContext before creating TabChildGlobal
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: IPC (show other bugs)
: 12 Branch
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug] (vacation Aug 25-28)
:
Mentors:
Depends on:
Blocks: 749018
  Show dependency treegraph
 
Reported: 2012-04-26 03:29 PDT by Olli Pettay [:smaug] (vacation Aug 25-28)
Modified: 2012-04-26 13:58 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


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

Description Olli Pettay [:smaug] (vacation Aug 25-28) 2012-04-26 03:29:30 PDT

    
Comment 1 Olli Pettay [:smaug] (vacation Aug 25-28) 2012-04-26 03:33:04 PDT
Created attachment 618605 [details] [diff] [review]
patch

this shouldn't be terribly bad bug, since without the context safejscontext
is used for JSON message creation.
Comment 2 Olli Pettay [:smaug] (vacation Aug 25-28) 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]
patch

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, jst@mozilla.com) 2012-04-26 13:51:05 PDT
Comment on attachment 618605 [details] [diff] [review]
patch

- In TabChildGlobal::Init()

   mMessageManager = new nsFrameMessageManager(false,
                                               SendSyncMessageToParent,
                                               SendAsyncMessageToParent,
                                               nsnull,
                                               mTabChild,
                                               nsnull,
-                                              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] (vacation Aug 25-28) 2012-04-26 13:51:49 PDT
I can add an assert
Comment 7 Olli Pettay [:smaug] (vacation Aug 25-28) 2012-04-26 13:56:28 PDT
Created attachment 618793 [details] [diff] [review]
patch
Comment 8 Olli Pettay [:smaug] (vacation Aug 25-28) 2012-04-26 13:58:30 PDT
https://hg.mozilla.org/mozilla-central/rev/dca63f21e6d2

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