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

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

Issue 260513004: DevTools: [Console] fix sourceurl when exception happens before inspector is open (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months 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/v8/V8Initializer.cpp
diff --git a/Source/bindings/v8/V8Initializer.cpp b/Source/bindings/v8/V8Initializer.cpp
index 0f2f1f13261ab942aa2ea857d92122aab04a38dd..bff8e292bab33c750e1c55b1d92d4b3c9520f822 100644
--- a/Source/bindings/v8/V8Initializer.cpp
+++ b/Source/bindings/v8/V8Initializer.cpp
@@ -106,7 +106,7 @@ static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand
if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallStackSizeToCapture, isolate);
- v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
+ v8::Handle<v8::Value> resourceName = message->GetScriptOrigin().ResourceName();
bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsString();
String resource = shouldUseDocumentURL ? enteredWindow->document()->url() : toCoreString(resourceName.As<v8::String>());
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
@@ -221,7 +221,7 @@ static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v
// During the frame teardown, there may not be a valid context.
if (ExecutionContext* context = scriptState->executionContext()) {
String errorMessage = toCoreString(message->Get());
- TOSTRING_VOID(V8StringResource<>, sourceURL, message->GetScriptResourceName());
+ TOSTRING_VOID(V8StringResource<>, sourceURL, message->GetScriptOrigin().ResourceName());
RefPtrWillBeRawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, message->GetLineNumber(), message->GetStartColumn() + 1, &DOMWrapperWorld::current(isolate));
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;

Powered by Google App Engine
This is Rietveld 408576698