Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1335)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 1419313003: Track the script state a listener was created in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
index cb060a3914b2c4af8aacaff84e39b6b6390de629..119ebc11724f619c1c2c255d55614b3697a294bf 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -170,7 +170,7 @@ static void messageHandlerInMainThread(v8::Local<v8::Message> message, v8::Local
// FIXME: Can we even get here during initialization now that we bail out when GetEntered returns an empty handle?
LocalFrame* frame = enteredWindow->document()->frame();
if (frame && frame->script().existingWindowProxy(scriptState->world())) {
- V8ErrorHandler::storeExceptionOnErrorEventWrapper(isolate, event.get(), data, scriptState->context()->Global());
+ V8ErrorHandler::storeExceptionOnErrorEventWrapper(scriptState, event.get(), data, scriptState->context()->Global());
}
if (scriptState->world().isPrivateScriptIsolatedWorld()) {
@@ -227,7 +227,7 @@ static void promiseRejectHandlerInMainThread(v8::PromiseRejectMessage data)
// Try to get the stack & location from a wrapped exception object (e.g. DOMException).
ASSERT(exception->IsObject());
v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(exception);
- v8::Local<v8::Value> error = V8HiddenValue::getHiddenValue(isolate, obj, V8HiddenValue::error(isolate));
+ v8::Local<v8::Value> error = V8HiddenValue::getHiddenValue(ScriptState::current(isolate), obj, V8HiddenValue::error(isolate));
if (!error.IsEmpty())
exception = error;
}
@@ -439,7 +439,7 @@ static void messageHandlerInWorker(v8::Local<v8::Message> message, v8::Local<v8:
// If execution termination has been triggered as part of constructing
// the error event from the v8::Message, quietly leave.
if (!v8::V8::IsExecutionTerminating(isolate)) {
- V8ErrorHandler::storeExceptionOnErrorEventWrapper(isolate, event.get(), data, scriptState->context()->Global());
+ V8ErrorHandler::storeExceptionOnErrorEventWrapper(scriptState, event.get(), data, scriptState->context()->Global());
context->reportException(event.release(), scriptId, callStack, corsStatus);
}
}

Powered by Google App Engine
This is Rietveld 408576698