The default bug view has changed. See this FAQ.

Make sure to have JSContext before creating TabChildGlobal

RESOLVED FIXED

Status

()

Core
IPC
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

12 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Comment hidden (empty)
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.
Attachment #618605 - Flags: review?(justin.lebar+bug)
...but I want to fix the assertion mention in bug 749018
Comment on attachment 618605 [details] [diff] [review]
patch

This looks fine to me, but I don't feel comfortable reviewing this code.
Attachment #618605 - Flags: review?(justin.lebar+bug) → feedback+
Attachment #618605 - Flags: review?(jst)
This fixes my assertion, so I'm happy.
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.
Attachment #618605 - Flags: review?(jst) → review+
I can add an assert
Created attachment 618793 [details] [diff] [review]
patch
https://hg.mozilla.org/mozilla-central/rev/dca63f21e6d2
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.