mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 988383 - Part 6: Replace AutoPushJSContext in nsGlobalWindow::GetMessageManager. r=bholley
This commit is contained in:
parent
9aac2a4c5d
commit
df004f7792
@ -13398,15 +13398,11 @@ nsGlobalWindow::GetMessageManager(ErrorResult& aError)
|
|||||||
nsGlobalChromeWindow* myself = static_cast<nsGlobalChromeWindow*>(this);
|
nsGlobalChromeWindow* myself = static_cast<nsGlobalChromeWindow*>(this);
|
||||||
if (!myself->mMessageManager) {
|
if (!myself->mMessageManager) {
|
||||||
nsIScriptContext* scx = GetContextInternal();
|
nsIScriptContext* scx = GetContextInternal();
|
||||||
if (NS_WARN_IF(!scx)) {
|
if (NS_WARN_IF(!scx || !(scx->GetNativeContext()))) {
|
||||||
aError.Throw(NS_ERROR_UNEXPECTED);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
AutoPushJSContext cx(scx->GetNativeContext());
|
|
||||||
if (NS_WARN_IF(!cx)) {
|
|
||||||
aError.Throw(NS_ERROR_UNEXPECTED);
|
aError.Throw(NS_ERROR_UNEXPECTED);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIMessageBroadcaster> globalMM =
|
nsCOMPtr<nsIMessageBroadcaster> globalMM =
|
||||||
do_GetService("@mozilla.org/globalmessagemanager;1");
|
do_GetService("@mozilla.org/globalmessagemanager;1");
|
||||||
myself->mMessageManager =
|
myself->mMessageManager =
|
||||||
|
Loading…
Reference in New Issue
Block a user