зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1017030 - Part 1: Replace AutoPushJSContext in ConsoleCallDataRunnable::RunConsole. r=bholley
This commit is contained in:
Родитель
4c56cbeac3
Коммит
3719eaf169
|
@ -15,6 +15,7 @@
|
|||
#include "nsGlobalWindow.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsPerformance.h"
|
||||
#include "ScriptSettings.h"
|
||||
#include "WorkerPrivate.h"
|
||||
#include "WorkerRunnable.h"
|
||||
#include "xpcprivate.h"
|
||||
|
@ -323,7 +324,8 @@ private:
|
|||
wp = wp->GetParent();
|
||||
}
|
||||
|
||||
AutoPushJSContext cx(wp->ParentJSContext());
|
||||
AutoJSAPI jsapi;
|
||||
JSContext* cx = jsapi.cx();
|
||||
ClearException ce(cx);
|
||||
|
||||
nsPIDOMWindow* window = wp->GetWindow();
|
||||
|
@ -332,6 +334,8 @@ private:
|
|||
nsRefPtr<nsGlobalWindow> win = static_cast<nsGlobalWindow*>(window);
|
||||
NS_ENSURE_TRUE_VOID(win);
|
||||
|
||||
JSAutoCompartment ac(cx, win->GetWrapperPreserveColor());
|
||||
|
||||
ErrorResult error;
|
||||
nsRefPtr<Console> console = win->GetConsole(error);
|
||||
if (error.Failed()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче