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

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

Issue 272613002: DevTools: implemented scriptFailedToParse protocol event (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/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index 2b3543c095f94e7e45425624a57c80a6f85ebf2a..a51ec6c38cfc51639fcaed8bdfc62e2d8958daf9 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -1114,7 +1114,7 @@ String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script)
// JavaScriptDebugListener functions
-void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script& script)
+void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script& script, bool hasSyntaxError)
{
// Don't send script content to the front end until it's really needed.
const bool* isContentScript = script.isContentScript ? &script.isContentScript : 0;
@@ -1129,11 +1129,11 @@ void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script
bool hasSourceURL = !sourceURL.isEmpty();
String scriptURL = hasSourceURL ? sourceURL : script.url;
bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : 0;
- m_frontend->scriptParsed(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
+ m_frontend->scriptParsed(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam, hasSyntaxError);
m_scripts.set(scriptId, script);
- if (scriptURL.isEmpty())
+ if (scriptURL.isEmpty() || hasSyntaxError)
return;
RefPtr<JSONObject> breakpointsCookie = m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
@@ -1159,11 +1159,6 @@ void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script
}
}
-void InspectorDebuggerAgent::failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage)
-{
- m_frontend->scriptFailedToParse(url, data, firstLine, errorLine, errorMessage);
-}
-
ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::didPause(ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints)
{
ScriptDebugListener::SkipPauseRequest result;

Powered by Google App Engine
This is Rietveld 408576698