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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" 5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
6 6
7 #include "platform/inspector_protocol/Parser.h" 7 #include "platform/inspector_protocol/Parser.h"
8 #include "platform/inspector_protocol/String16.h" 8 #include "platform/inspector_protocol/String16.h"
9 #include "platform/inspector_protocol/Values.h" 9 #include "platform/inspector_protocol/Values.h"
10 #include "platform/v8_inspector/InjectedScript.h" 10 #include "platform/v8_inspector/InjectedScript.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 , m_breakReason(protocol::Debugger::Paused::ReasonEnum::Other) 106 , m_breakReason(protocol::Debugger::Paused::ReasonEnum::Other)
107 , m_scheduledDebuggerStep(NoStep) 107 , m_scheduledDebuggerStep(NoStep)
108 , m_skipNextDebuggerStepOut(false) 108 , m_skipNextDebuggerStepOut(false)
109 , m_javaScriptPauseScheduled(false) 109 , m_javaScriptPauseScheduled(false)
110 , m_steppingFromFramework(false) 110 , m_steppingFromFramework(false)
111 , m_pausingOnNativeEvent(false) 111 , m_pausingOnNativeEvent(false)
112 , m_skippedStepFrameCount(0) 112 , m_skippedStepFrameCount(0)
113 , m_recursionLevelForStepOut(0) 113 , m_recursionLevelForStepOut(0)
114 , m_recursionLevelForStepFrame(0) 114 , m_recursionLevelForStepFrame(0)
115 , m_skipAllPauses(false) 115 , m_skipAllPauses(false)
116 , m_ignoreScriptParsedEvents(false)
116 { 117 {
117 clearBreakDetails(); 118 clearBreakDetails();
118 } 119 }
119 120
120 V8DebuggerAgentImpl::~V8DebuggerAgentImpl() 121 V8DebuggerAgentImpl::~V8DebuggerAgentImpl()
121 { 122 {
122 } 123 }
123 124
124 bool V8DebuggerAgentImpl::checkEnabled(ErrorString* errorString) 125 bool V8DebuggerAgentImpl::checkEnabled(ErrorString* errorString)
125 { 126 {
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() 988 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace()
988 { 989 {
989 if (m_pausedContext.IsEmpty()) 990 if (m_pausedContext.IsEmpty())
990 return nullptr; 991 return nullptr;
991 V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain(); 992 V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain();
992 return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger) : nu llptr; 993 return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger) : nu llptr;
993 } 994 }
994 995
995 void V8DebuggerAgentImpl::didParseSource(std::unique_ptr<V8DebuggerScript> scrip t, bool success) 996 void V8DebuggerAgentImpl::didParseSource(std::unique_ptr<V8DebuggerScript> scrip t, bool success)
996 { 997 {
998 if (m_ignoreScriptParsedEvents)
999 return;
997 v8::HandleScope handles(m_isolate); 1000 v8::HandleScope handles(m_isolate);
998 String16 scriptSource = toProtocolString(script->source(m_isolate)); 1001 String16 scriptSource = toProtocolString(script->source(m_isolate));
999 bool isDeprecatedSourceURL = false; 1002 bool isDeprecatedSourceURL = false;
1000 if (!success) 1003 if (!success)
1001 script->setSourceURL(findSourceURL(scriptSource, false, &isDeprecatedSou rceURL)); 1004 script->setSourceURL(findSourceURL(scriptSource, false, &isDeprecatedSou rceURL));
1002 else if (script->hasSourceURL()) 1005 else if (script->hasSourceURL())
1003 findSourceURL(scriptSource, false, &isDeprecatedSourceURL); 1006 findSourceURL(scriptSource, false, &isDeprecatedSourceURL);
1004 1007
1005 bool isDeprecatedSourceMappingURL = false; 1008 bool isDeprecatedSourceMappingURL = false;
1006 if (!success) 1009 if (!success)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 m_debugger->breakProgram(); 1160 m_debugger->breakProgram();
1158 } 1161 }
1159 1162
1160 void V8DebuggerAgentImpl::breakProgramOnException(const String16& breakReason, s td::unique_ptr<protocol::DictionaryValue> data) 1163 void V8DebuggerAgentImpl::breakProgramOnException(const String16& breakReason, s td::unique_ptr<protocol::DictionaryValue> data)
1161 { 1164 {
1162 if (!enabled() || m_debugger->getPauseOnExceptionsState() == V8Debugger::Don tPauseOnExceptions) 1165 if (!enabled() || m_debugger->getPauseOnExceptionsState() == V8Debugger::Don tPauseOnExceptions)
1163 return; 1166 return;
1164 breakProgram(breakReason, std::move(data)); 1167 breakProgram(breakReason, std::move(data));
1165 } 1168 }
1166 1169
1170 void V8DebuggerAgentImpl::setIgnoreScriptParsedEvents(bool ignore)
kozy 2016/08/09 16:25:44 Can we ignore this events in V8Debugger because V8
lushnikov 2016/08/09 20:16:13 Done.
1171 {
1172 m_ignoreScriptParsedEvents = ignore;
1173 }
1174
1167 bool V8DebuggerAgentImpl::assertPaused(ErrorString* errorString) 1175 bool V8DebuggerAgentImpl::assertPaused(ErrorString* errorString)
1168 { 1176 {
1169 if (m_pausedContext.IsEmpty()) { 1177 if (m_pausedContext.IsEmpty()) {
1170 *errorString = "Can only perform operation while paused."; 1178 *errorString = "Can only perform operation while paused.";
1171 return false; 1179 return false;
1172 } 1180 }
1173 return true; 1181 return true;
1174 } 1182 }
1175 1183
1176 void V8DebuggerAgentImpl::clearBreakDetails() 1184 void V8DebuggerAgentImpl::clearBreakDetails()
(...skipping 18 matching lines...) Expand all
1195 { 1203 {
1196 if (!enabled()) 1204 if (!enabled())
1197 return; 1205 return;
1198 m_scheduledDebuggerStep = NoStep; 1206 m_scheduledDebuggerStep = NoStep;
1199 m_scripts.clear(); 1207 m_scripts.clear();
1200 m_blackboxedPositions.clear(); 1208 m_blackboxedPositions.clear();
1201 m_breakpointIdToDebuggerBreakpointIds.clear(); 1209 m_breakpointIdToDebuggerBreakpointIds.clear();
1202 } 1210 }
1203 1211
1204 } // namespace blink 1212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698