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

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

Issue 443943002: DevTools: Fix framework blackboxing for exceptions thrown inside V8 internal scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed test Created 6 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 | « Source/core/inspector/InspectorDebuggerAgent.h ('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 4eeeba1cadc5a51039ae56c0c637f0a13aaa64d0..4a842206e76c2a57fbe42a9d1fdc15608d29e4df 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -466,6 +466,18 @@ void InspectorDebuggerAgent::getBacktrace(ErrorString* errorString, RefPtr<Array
asyncStackTrace = currentAsyncStackTrace();
}
+PassRefPtrWillBeRawPtr<JavaScriptCallFrame> InspectorDebuggerAgent::topCallFrameSkipUnknownSources()
+{
+ for (int index = 0; ; ++index) {
+ RefPtrWillBeRawPtr<JavaScriptCallFrame> frame = scriptDebugServer().callFrameNoScopes(index);
+ if (!frame)
+ return nullptr;
+ String scriptIdString = String::number(frame->sourceID());
+ if (m_scripts.contains(scriptIdString))
+ return frame.release();
+ }
+}
+
String InspectorDebuggerAgent::scriptURL(JavaScriptCallFrame* frame)
{
String scriptIdString = String::number(frame->sourceID());
@@ -482,7 +494,7 @@ ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipExceptio
// FIXME: Fast return: if (!m_cachedSkipStackRegExp && !has_any_anti_breakpoint) return ScriptDebugListener::NoSkip;
- RefPtrWillBeRawPtr<JavaScriptCallFrame> topFrame = scriptDebugServer().topCallFrameNoScopes();
+ RefPtrWillBeRawPtr<JavaScriptCallFrame> topFrame = topCallFrameSkipUnknownSources();
if (!topFrame)
return ScriptDebugListener::NoSkip;
@@ -535,7 +547,7 @@ ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipStepPaus
if (!m_cachedSkipStackRegExp || m_steppingFromFramework)
return ScriptDebugListener::NoSkip;
- RefPtrWillBeRawPtr<JavaScriptCallFrame> topFrame = scriptDebugServer().topCallFrameNoScopes();
+ RefPtrWillBeRawPtr<JavaScriptCallFrame> topFrame = topCallFrameSkipUnknownSources();
String scriptUrl = scriptURL(topFrame.get());
if (scriptUrl.isEmpty() || m_cachedSkipStackRegExp->match(scriptUrl) == -1)
return ScriptDebugListener::NoSkip;
@@ -567,7 +579,7 @@ bool InspectorDebuggerAgent::isTopCallFrameInFramework()
if (!m_cachedSkipStackRegExp)
return false;
- RefPtrWillBeRawPtr<JavaScriptCallFrame> topFrame = scriptDebugServer().topCallFrameNoScopes();
+ RefPtrWillBeRawPtr<JavaScriptCallFrame> topFrame = topCallFrameSkipUnknownSources();
if (!topFrame)
return false;
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698