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

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

Issue 60203007: DevTools: Fix disabling all pauses on reload. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 7 years, 1 month 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 | « Source/bindings/v8/ScriptDebugServer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index 539bf174ab1259cda34736595d6d261e2b318981..44df24e310379c621a0dedf85e9387ccf0cb7522 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -463,19 +463,21 @@ ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipExceptio
{
if (m_skipAllPauses)
return ScriptDebugListener::Continue;
+ if (!topFrame)
+ return ScriptDebugListener::NoSkip;
String topFrameScriptUrl = scriptURL(topFrame.get());
if (m_cachedSkipStackRegExp && !topFrameScriptUrl.isEmpty() && m_cachedSkipStackRegExp->match(topFrameScriptUrl) != -1)
return ScriptDebugListener::Continue;
- // Prepare top frame parameters;
- int topFrameLineNumber = topFrame->line();
- int topFrameColumnNumber = topFrame->column();
-
// Match against breakpoints.
if (topFrameScriptUrl.isEmpty())
return ScriptDebugListener::NoSkip;
+ // Prepare top frame parameters.
+ int topFrameLineNumber = topFrame->line();
+ int topFrameColumnNumber = topFrame->column();
+
RefPtr<JSONObject> breakpointsCookie = m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
for (JSONObject::iterator it = breakpointsCookie->begin(); it != breakpointsCookie->end(); ++it) {
RefPtr<JSONObject> breakpointObject = it->value->asObject();
@@ -512,6 +514,8 @@ ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipBreakpoi
{
if (m_skipAllPauses)
return ScriptDebugListener::Continue;
+ if (!topFrame)
+ return ScriptDebugListener::NoSkip;
return ScriptDebugListener::NoSkip;
}
@@ -519,6 +523,8 @@ ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipStepPaus
{
if (m_skipAllPauses)
return ScriptDebugListener::Continue;
+ if (!topFrame)
+ return ScriptDebugListener::NoSkip;
if (m_cachedSkipStackRegExp) {
String scriptUrl = scriptURL(topFrame.get());
@@ -1025,6 +1031,8 @@ bool InspectorDebuggerAgent::canBreakProgram()
void InspectorDebuggerAgent::breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data)
{
+ if (m_skipAllPauses)
+ return;
m_breakReason = breakReason;
m_breakAuxData = data;
scriptDebugServer().breakProgram();
« no previous file with comments | « Source/bindings/v8/ScriptDebugServer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698