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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp

Issue 2219393003: DevTools: Runtime.compileScript with persistScript = false should not report script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 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
Index: third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp
index f580af4f068ea0904f92ac69df16ff6ceddf25e0..a4cffc77e88853fcf95f15610b39de1d44439257 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp
@@ -48,6 +48,7 @@ V8Debugger::V8Debugger(v8::Isolate* isolate, V8InspectorImpl* inspector)
, m_enableCount(0)
, m_breakpointsActivated(true)
, m_runningNestedMessageLoop(false)
+ , m_ignoreScriptParsedEvents(false)
, m_maxAsyncCallStackDepth(0)
{
}
@@ -504,7 +505,7 @@ void V8Debugger::handleV8DebugEvent(const v8::Debug::EventDetails& eventDetails)
V8DebuggerAgentImpl* agent = m_inspector->enabledDebuggerAgentForGroup(getGroupId(eventContext));
if (agent) {
v8::HandleScope scope(m_isolate);
- if (event == v8::AfterCompile || event == v8::CompileError) {
+ if (!m_ignoreScriptParsedEvents && (event == v8::AfterCompile || event == v8::CompileError)) {
v8::Context::Scope contextScope(debuggerContext());
v8::Local<v8::Value> argv[] = { eventDetails.GetEventData() };
v8::Local<v8::Value> value = callDebuggerMethod("getAfterCompileScript", 1, argv).ToLocalChecked();
@@ -806,6 +807,11 @@ void V8Debugger::allAsyncTasksCanceled()
m_currentTasks.clear();
}
+void V8Debugger::setIgnoreScriptParsedEvents(bool ignore)
+{
+ m_ignoreScriptParsedEvents = ignore;
+}
+
std::unique_ptr<V8StackTraceImpl> V8Debugger::captureStackTrace(bool fullStack)
{
if (!m_isolate->InContext())

Powered by Google App Engine
This is Rietveld 408576698