| Index: Source/core/inspector/InspectorDebuggerAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| index 367ee470d56351c9fa08006a28934814eca24a1a..4b9677b6ced09b0ed0d746b1cd1139926ea8df3e 100644
|
| --- a/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| +++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| @@ -1199,7 +1199,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, CompileResult compileResult)
|
| {
|
| // Don't send script content to the front end until it's really needed.
|
| const bool* isContentScript = script.isContentScript ? &script.isContentScript : 0;
|
| @@ -1214,11 +1214,15 @@ 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);
|
| + bool hasSyntaxError = compileResult != CompileSuccess;
|
| + if (!hasSyntaxError)
|
| + m_frontend->scriptParsed(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
|
| + else
|
| + m_frontend->scriptFailedToParse(scriptId, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
|
|
|
| m_scripts.set(scriptId, script);
|
|
|
| - if (scriptURL.isEmpty())
|
| + if (scriptURL.isEmpty() || hasSyntaxError)
|
| return;
|
|
|
| RefPtr<JSONObject> breakpointsCookie = m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
|
| @@ -1244,11 +1248,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;
|
|
|