mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 749128 - Make sure to have JSContext before creating TabChildGlobal, r=jst
This commit is contained in:
parent
c5d596b74e
commit
3c497e9072
@ -907,6 +907,8 @@ TabChild::InitTabChildGlobal()
|
||||
|
||||
NS_ENSURE_TRUE(InitTabChildGlobalInternal(scopeSupports), false);
|
||||
|
||||
scope->Init();
|
||||
|
||||
nsCOMPtr<nsPIWindowRoot> root = do_QueryInterface(chromeHandler);
|
||||
NS_ENSURE_TRUE(root, false);
|
||||
root->SetParentTarget(scope);
|
||||
@ -990,13 +992,19 @@ SendAsyncMessageToParent(void* aCallbackData,
|
||||
TabChildGlobal::TabChildGlobal(TabChild* aTabChild)
|
||||
: mTabChild(aTabChild)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TabChildGlobal::Init()
|
||||
{
|
||||
NS_ASSERTION(!mMessageManager, "Re-initializing?!?");
|
||||
mMessageManager = new nsFrameMessageManager(false,
|
||||
SendSyncMessageToParent,
|
||||
SendAsyncMessageToParent,
|
||||
nsnull,
|
||||
mTabChild,
|
||||
nsnull,
|
||||
aTabChild->GetJSContext());
|
||||
mTabChild->GetJSContext());
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(TabChildGlobal)
|
||||
|
@ -94,6 +94,7 @@ class TabChildGlobal : public nsDOMEventTargetHelper,
|
||||
{
|
||||
public:
|
||||
TabChildGlobal(TabChild* aTabChild);
|
||||
void Init();
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TabChildGlobal, nsDOMEventTargetHelper)
|
||||
NS_FORWARD_SAFE_NSIFRAMEMESSAGEMANAGER(mMessageManager)
|
||||
|
Loading…
Reference in New Issue
Block a user