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

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

Issue 1286423003: DevTools: add release asserts to track weird crash in V8DebuggerAgent::resolveBreakpoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/V8DebuggerAgent.cpp
diff --git a/Source/core/inspector/V8DebuggerAgent.cpp b/Source/core/inspector/V8DebuggerAgent.cpp
index efef5e7bfc693971e7633131ee6fbd26c917015b..7067f313e5e6f7253a0275efb6afd9b91d41e908 100644
--- a/Source/core/inspector/V8DebuggerAgent.cpp
+++ b/Source/core/inspector/V8DebuggerAgent.cpp
@@ -535,10 +535,9 @@ V8DebuggerListener::SkipPauseRequest V8DebuggerAgent::shouldSkipStepPause()
PassRefPtr<TypeBuilder::Debugger::Location> V8DebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint, BreakpointSource source)
{
ASSERT(enabled());
- if (breakpointId.isEmpty()) {
- ASSERT_NOT_REACHED();
- return nullptr;
- }
+ // FIXME: remove these checks once crbug.com/520702 is resolved.
+ RELEASE_ASSERT(!breakpointId.isEmpty());
+ RELEASE_ASSERT(!scriptId.isEmpty());
ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId);
if (scriptIterator == m_scripts.end())
return nullptr;
@@ -554,6 +553,7 @@ PassRefPtr<TypeBuilder::Debugger::Location> V8DebuggerAgent::resolveBreakpoint(c
m_serverBreakpoints.set(debuggerBreakpointId, std::make_pair(breakpointId, source));
+ RELEASE_ASSERT(!breakpointId.isEmpty());
BreakpointIdToDebuggerBreakpointIdsMap::iterator debuggerBreakpointIdsIterator = m_breakpointIdToDebuggerBreakpointIds.find(breakpointId);
if (debuggerBreakpointIdsIterator == m_breakpointIdToDebuggerBreakpointIds.end())
m_breakpointIdToDebuggerBreakpointIds.set(breakpointId, Vector<String>()).storedValue->value.append(debuggerBreakpointId);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698