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

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 1305433004: DevTools: fix assertion failure when collecting async calls stacks (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #include "config.h" 30 #include "config.h"
31 #include "core/inspector/InspectorDebuggerAgent.h" 31 #include "core/inspector/InspectorDebuggerAgent.h"
32 32
33 #include "bindings/core/v8/V8Binding.h" 33 #include "bindings/core/v8/V8Binding.h"
34 #include "core/inspector/ScriptAsyncCallStack.h" 34 #include "core/inspector/ScriptAsyncCallStack.h"
35 #include "core/inspector/v8/V8Debugger.h" 35 #include "core/inspector/v8/V8Debugger.h"
36 #include "platform/ScriptForbiddenScope.h"
37 #include "wtf/MainThread.h"
36 38
37 namespace blink { 39 namespace blink {
38 40
39 InspectorDebuggerAgent::InspectorDebuggerAgent(InjectedScriptManager* injectedSc riptManager, V8Debugger* debugger, int contextGroupId) 41 InspectorDebuggerAgent::InspectorDebuggerAgent(InjectedScriptManager* injectedSc riptManager, V8Debugger* debugger, int contextGroupId)
40 : InspectorBaseAgent<InspectorDebuggerAgent, InspectorFrontend::Debugger>("D ebugger") 42 : InspectorBaseAgent<InspectorDebuggerAgent, InspectorFrontend::Debugger>("D ebugger")
41 , m_v8DebuggerAgent(adoptPtrWillBeNoop(new V8DebuggerAgent(injectedScriptMan ager, debugger, this, contextGroupId))) 43 , m_v8DebuggerAgent(adoptPtrWillBeNoop(new V8DebuggerAgent(injectedScriptMan ager, debugger, this, contextGroupId)))
42 { 44 {
43 } 45 }
44 46
45 InspectorDebuggerAgent::~InspectorDebuggerAgent() 47 InspectorDebuggerAgent::~InspectorDebuggerAgent()
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 m_instrumentingAgents->setInspectorDebuggerAgent(nullptr); 254 m_instrumentingAgents->setInspectorDebuggerAgent(nullptr);
253 } 255 }
254 256
255 bool InspectorDebuggerAgent::isPaused() 257 bool InspectorDebuggerAgent::isPaused()
256 { 258 {
257 return m_v8DebuggerAgent->isPaused(); 259 return m_v8DebuggerAgent->isPaused();
258 } 260 }
259 261
260 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> InspectorDebuggerAgent::currentAsyn cStackTraceForConsole() 262 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> InspectorDebuggerAgent::currentAsyn cStackTraceForConsole()
261 { 263 {
264 OwnPtr<ScriptForbiddenScope::AllowUserAgentScript> allowScripting;
esprehn 2015/08/19 22:43:53 I think you want to use Optional<ScriptForbiddenSc
yurys 2015/08/20 00:05:09 Didn't know that we have Optional, thanks! https:
265 if (isMainThread())
266 allowScripting = adoptPtr(new ScriptForbiddenScope::AllowUserAgentScript ());
262 return m_v8DebuggerAgent->currentAsyncStackTraceForConsole(); 267 return m_v8DebuggerAgent->currentAsyncStackTraceForConsole();
263 } 268 }
264 269
265 void InspectorDebuggerAgent::didFireTimer() 270 void InspectorDebuggerAgent::didFireTimer()
266 { 271 {
267 m_v8DebuggerAgent->cancelPauseOnNextStatement(); 272 m_v8DebuggerAgent->cancelPauseOnNextStatement();
268 } 273 }
269 274
270 void InspectorDebuggerAgent::didHandleEvent() 275 void InspectorDebuggerAgent::didHandleEvent()
271 { 276 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 { 321 {
317 m_v8DebuggerAgent->clearFrontend(); 322 m_v8DebuggerAgent->clearFrontend();
318 } 323 }
319 324
320 void InspectorDebuggerAgent::restore() 325 void InspectorDebuggerAgent::restore()
321 { 326 {
322 m_v8DebuggerAgent->restore(); 327 m_v8DebuggerAgent->restore();
323 } 328 }
324 329
325 } // namespace blink 330 } // namespace blink
OLDNEW
« 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