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

Unified Diff: Source/core/inspector/InjectedScriptBase.cpp

Issue 566883002: [DevTools] Report correct syntax error location for evaluated in console script (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/core/inspector/JavaScriptCallFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScriptBase.cpp
diff --git a/Source/core/inspector/InjectedScriptBase.cpp b/Source/core/inspector/InjectedScriptBase.cpp
index c6d35c567b5b6f96a135442c098c9b00cb223d95..487a07f5cd4afd479160f3a88cffde3996cad242 100644
--- a/Source/core/inspector/InjectedScriptBase.cpp
+++ b/Source/core/inspector/InjectedScriptBase.cpp
@@ -60,6 +60,9 @@ static PassRefPtr<TypeBuilder::Debugger::ExceptionDetails> toExceptionDetails(Pa
int column = 0;
if (object->getNumber("column", &column))
exceptionDetails->setColumn(column);
+ int originScriptId = 0;
+ object->getNumber("scriptId", &originScriptId);
+
RefPtr<JSONArray> stackTrace = object->getArray("stackTrace");
if (stackTrace && stackTrace->length() > 0) {
RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > frames = TypeBuilder::Array<TypeBuilder::Console::CallFrame>::create();
@@ -71,6 +74,9 @@ static PassRefPtr<TypeBuilder::Debugger::ExceptionDetails> toExceptionDetails(Pa
stackFrame->getNumber("column", &column);
int scriptId = 0;
stackFrame->getNumber("scriptId", &scriptId);
+ if (i == 0 && scriptId == originScriptId)
apavlov 2014/10/03 09:54:43 !i
kozyatinskiy1 2014/10/03 10:08:26 Done.
+ originScriptId = 0;
+
String sourceURL;
stackFrame->getString("scriptNameOrSourceURL", &sourceURL);
String functionName;
@@ -87,6 +93,8 @@ static PassRefPtr<TypeBuilder::Debugger::ExceptionDetails> toExceptionDetails(Pa
}
exceptionDetails->setStackTrace(frames.release());
}
+ if (originScriptId)
+ exceptionDetails->setScriptId(String::number(originScriptId));
return exceptionDetails.release();
}
« no previous file with comments | « no previous file | Source/core/inspector/JavaScriptCallFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698