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

Side by Side Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 1163923005: Fix crash in inspector-protocol/debugger/debugger-pause-dedicated-worker.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed printf Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/WorkerInspectorController.cpp ('k') | 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-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2010-2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "core/inspector/InspectorInputAgent.h" 53 #include "core/inspector/InspectorInputAgent.h"
54 #include "core/inspector/InspectorInspectorAgent.h" 54 #include "core/inspector/InspectorInspectorAgent.h"
55 #include "core/inspector/InspectorInstrumentation.h" 55 #include "core/inspector/InspectorInstrumentation.h"
56 #include "core/inspector/InspectorLayerTreeAgent.h" 56 #include "core/inspector/InspectorLayerTreeAgent.h"
57 #include "core/inspector/InspectorMemoryAgent.h" 57 #include "core/inspector/InspectorMemoryAgent.h"
58 #include "core/inspector/InspectorOverlay.h" 58 #include "core/inspector/InspectorOverlay.h"
59 #include "core/inspector/InspectorPageAgent.h" 59 #include "core/inspector/InspectorPageAgent.h"
60 #include "core/inspector/InspectorProfilerAgent.h" 60 #include "core/inspector/InspectorProfilerAgent.h"
61 #include "core/inspector/InspectorResourceAgent.h" 61 #include "core/inspector/InspectorResourceAgent.h"
62 #include "core/inspector/InspectorState.h" 62 #include "core/inspector/InspectorState.h"
63 #include "core/inspector/InspectorTaskRunner.h"
63 #include "core/inspector/InspectorTimelineAgent.h" 64 #include "core/inspector/InspectorTimelineAgent.h"
64 #include "core/inspector/InspectorTracingAgent.h" 65 #include "core/inspector/InspectorTracingAgent.h"
65 #include "core/inspector/InspectorWorkerAgent.h" 66 #include "core/inspector/InspectorWorkerAgent.h"
66 #include "core/inspector/InstrumentingAgents.h" 67 #include "core/inspector/InstrumentingAgents.h"
67 #include "core/inspector/PageConsoleAgent.h" 68 #include "core/inspector/PageConsoleAgent.h"
68 #include "core/inspector/PageDebuggerAgent.h" 69 #include "core/inspector/PageDebuggerAgent.h"
69 #include "core/inspector/PageRuntimeAgent.h" 70 #include "core/inspector/PageRuntimeAgent.h"
70 #include "core/layout/LayoutView.h" 71 #include "core/layout/LayoutView.h"
71 #include "core/page/FocusController.h" 72 #include "core/page/FocusController.h"
72 #include "core/page/Page.h" 73 #include "core/page/Page.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 UseCounter::muteForInspector(); 243 UseCounter::muteForInspector();
243 } 244 }
244 245
245 void unmuteWarningsAndDeprecations() 246 void unmuteWarningsAndDeprecations()
246 { 247 {
247 FrameConsole::unmute(); 248 FrameConsole::unmute();
248 UseCounter::unmuteForInspector(); 249 UseCounter::unmuteForInspector();
249 } 250 }
250 }; 251 };
251 252
252 class DebuggerTask : public V8Debugger::Task { 253 class DebuggerTask : public InspectorTaskRunner::Task {
253 public: 254 public:
254 DebuggerTask(PassOwnPtr<WebDevToolsAgent::MessageDescriptor> descriptor) 255 DebuggerTask(PassOwnPtr<WebDevToolsAgent::MessageDescriptor> descriptor)
255 : m_descriptor(descriptor) 256 : m_descriptor(descriptor)
256 { 257 {
257 } 258 }
258 259
259 virtual ~DebuggerTask() { } 260 virtual ~DebuggerTask() { }
260 virtual void run() 261 virtual void run()
261 { 262 {
262 WebDevToolsAgent* webagent = m_descriptor->agent(); 263 WebDevToolsAgent* webagent = m_descriptor->agent();
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 void WebDevToolsAgentImpl::disableTracing() 627 void WebDevToolsAgentImpl::disableTracing()
627 { 628 {
628 m_client->disableTracing(); 629 m_client->disableTracing();
629 } 630 }
630 631
631 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message) 632 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
632 { 633 {
633 if (!m_attached) 634 if (!m_attached)
634 return; 635 return;
635 if (WebDevToolsAgent::shouldInterruptForMessage(message)) 636 if (WebDevToolsAgent::shouldInterruptForMessage(message))
636 MainThreadDebugger::instance()->debugger()->runPendingTasks(); 637 MainThreadDebugger::instance()->taskRunner()->runPendingTasks();
637 else 638 else
638 dispatchMessageFromFrontend(message); 639 dispatchMessageFromFrontend(message);
639 } 640 }
640 641
641 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(const String& message) 642 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(const String& message)
642 { 643 {
643 if (m_inspectorBackendDispatcher) 644 if (m_inspectorBackendDispatcher)
644 m_inspectorBackendDispatcher->dispatch(message); 645 m_inspectorBackendDispatcher->dispatch(message);
645 } 646 }
646 647
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) 740 if (!InspectorBackendDispatcher::getCommandName(message, &commandName))
740 return false; 741 return false;
741 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd) 742 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd)
742 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd) 743 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd)
743 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd) 744 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd)
744 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) 745 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd)
745 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); 746 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd);
746 } 747 }
747 748
748 } // namespace blink 749 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/WorkerInspectorController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698