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

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

Issue 2006893004: Store SourceLocation in ErrorEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2010603002
Patch Set: rebased Created 4 years, 7 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: 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 cd6e616c9e9a8ff61408bd11976fd74c408ce6a3..f2c049db85f3b606f91f425b876d1cb1ad19f2a5 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -128,7 +128,7 @@ static void messageHandlerInMainThread(v8::Local<v8::Message> message, v8::Local
else if (message->IsSharedCrossOrigin())
accessControlStatus = SharableCrossOrigin;
- ErrorEvent* event = ErrorEvent::create(toCoreStringWithNullCheck(message->Get()), location->url(), location->lineNumber(), location->columnNumber(), &scriptState->world());
+ ErrorEvent* event = ErrorEvent::create(toCoreStringWithNullCheck(message->Get()), std::move(location), &scriptState->world());
String messageForConsole = extractMessageForConsole(isolate, data);
if (!messageForConsole.isEmpty())
@@ -152,9 +152,9 @@ static void messageHandlerInMainThread(v8::Local<v8::Message> message, v8::Local
// other isolated worlds (which means that the error events won't fire any event listeners
// in user's scripts).
EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents;
- context->reportException(event, std::move(location), accessControlStatus);
+ context->reportException(event, accessControlStatus);
} else {
- context->reportException(event, std::move(location), accessControlStatus);
+ context->reportException(event, accessControlStatus);
}
}
@@ -400,7 +400,7 @@ static void messageHandlerInWorker(v8::Local<v8::Message> message, v8::Local<v8:
ExecutionContext* context = scriptState->getExecutionContext();
OwnPtr<SourceLocation> location = SourceLocation::fromMessage(isolate, message, context);
- ErrorEvent* event = ErrorEvent::create(toCoreStringWithNullCheck(message->Get()), location->url(), location->lineNumber(), location->columnNumber(), &scriptState->world());
+ ErrorEvent* event = ErrorEvent::create(toCoreStringWithNullCheck(message->Get()), std::move(location), &scriptState->world());
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
@@ -408,7 +408,7 @@ static void messageHandlerInWorker(v8::Local<v8::Message> message, v8::Local<v8:
// the error event from the v8::Message, quietly leave.
if (!isolate->IsExecutionTerminating()) {
V8ErrorHandler::storeExceptionOnErrorEventWrapper(scriptState, event, data, scriptState->context()->Global());
- scriptState->getExecutionContext()->reportException(event, std::move(location), corsStatus);
+ scriptState->getExecutionContext()->reportException(event, corsStatus);
}
perIsolateData->setReportingException(false);

Powered by Google App Engine
This is Rietveld 408576698