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

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

Issue 743153002: [DevTools] Show stack trace for exceptions in dedicated workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@worker-capture-stack
Patch Set: Rebased Created 6 years 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: Source/bindings/core/v8/V8Initializer.cpp
diff --git a/Source/bindings/core/v8/V8Initializer.cpp b/Source/bindings/core/v8/V8Initializer.cpp
index f39ca85c4e6ceb271a1d8a541d9f8058e7ce5463..accbd4bf22bedc1abe1d86212cdd0778c1f51b72 100644
--- a/Source/bindings/core/v8/V8Initializer.cpp
+++ b/Source/bindings/core/v8/V8Initializer.cpp
@@ -483,7 +483,8 @@ static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v
if (ExecutionContext* context = scriptState->executionContext()) {
String errorMessage = toCoreString(message->Get());
TOSTRING_VOID(V8StringResource<>, sourceURL, message->GetScriptOrigin().ResourceName());
- int scriptId = message->GetScriptOrigin().ScriptID()->Value();
+ int scriptId = 0;
+ RefPtrWillBeRawPtr<ScriptCallStack> callStack = extractCallStack(isolate, message, &scriptId);
RefPtrWillBeRawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, message->GetLineNumber(), message->GetStartColumn() + 1, &DOMWrapperWorld::current(isolate));
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
@@ -492,7 +493,7 @@ static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v
// the error event from the v8::Message, quietly leave.
if (!v8::V8::IsExecutionTerminating(isolate)) {
V8ErrorHandler::storeExceptionOnErrorEventWrapper(isolate, event.get(), data, scriptState->context()->Global());
- context->reportException(event.release(), scriptId, nullptr, corsStatus);
+ context->reportException(event.release(), scriptId, callStack, corsStatus);
}
}

Powered by Google App Engine
This is Rietveld 408576698