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

Unified Diff: third_party/WebKit/Source/core/dom/ExecutionContext.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/core/dom/ExecutionContext.cpp
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
index 0a5bebd71c70a72c300ad158170984893ec7088f..e061090ddd543b662b1460c7c68312f3eae47b71 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
@@ -138,18 +138,18 @@ bool ExecutionContext::shouldSanitizeScriptError(const String& sourceURL, Access
return !(getSecurityOrigin()->canRequestNoSuborigin(completeURL(sourceURL)) || corsStatus == SharableCrossOrigin);
}
-void ExecutionContext::reportException(ErrorEvent* errorEvent, PassOwnPtr<SourceLocation> location, AccessControlStatus corsStatus)
+void ExecutionContext::reportException(ErrorEvent* errorEvent, AccessControlStatus corsStatus)
{
if (m_inDispatchErrorEvent) {
if (!m_pendingExceptions)
m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException>>());
- m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->messageForConsole(), std::move(location))));
+ m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->messageForConsole(), errorEvent->location()->clone())));
return;
}
// First report the original exception and only then all the nested ones.
if (!dispatchErrorEvent(errorEvent, corsStatus))
- logExceptionToConsole(errorEvent->messageForConsole(), std::move(location));
+ logExceptionToConsole(errorEvent->messageForConsole(), errorEvent->location()->clone());
if (!m_pendingExceptions)
return;

Powered by Google App Engine
This is Rietveld 408576698