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

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

Issue 1164263002: DevTools: disable interrupts when dispatching inspector commands (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed invalid assert 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 if (!m_attached) 634 if (!m_attached)
635 return; 635 return;
636 if (WebDevToolsAgent::shouldInterruptForMessage(message)) 636 if (WebDevToolsAgent::shouldInterruptForMessage(message))
637 MainThreadDebugger::instance()->taskRunner()->runPendingTasks(); 637 MainThreadDebugger::instance()->taskRunner()->runPendingTasks();
638 else 638 else
639 dispatchMessageFromFrontend(message); 639 dispatchMessageFromFrontend(message);
640 } 640 }
641 641
642 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(const String& message) 642 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(const String& message)
643 { 643 {
644 InspectorTaskRunner::IgnoreInterruptsScope scope(MainThreadDebugger::instanc e()->taskRunner());
644 if (m_inspectorBackendDispatcher) 645 if (m_inspectorBackendDispatcher)
645 m_inspectorBackendDispatcher->dispatch(message); 646 m_inspectorBackendDispatcher->dispatch(message);
646 } 647 }
647 648
648 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame) 649 void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& pointInRootFrame)
649 { 650 {
650 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent; 651 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent;
651 HitTestRequest request(hitType); 652 HitTestRequest request(hitType);
652 WebMouseEvent dummyEvent; 653 WebMouseEvent dummyEvent;
653 dummyEvent.type = WebInputEvent::MouseDown; 654 dummyEvent.type = WebInputEvent::MouseDown;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) 741 if (!InspectorBackendDispatcher::getCommandName(message, &commandName))
741 return false; 742 return false;
742 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd) 743 return commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_pauseCmd)
743 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd) 744 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointCmd)
744 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd) 745 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointByUrlCmd)
745 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd) 746 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_removeBreakpointCmd)
746 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd); 747 || commandName == InspectorBackendDispatcher::commandName(InspectorBacke ndDispatcher::kDebugger_setBreakpointsActiveCmd);
747 } 748 }
748 749
749 } // namespace blink 750 } // 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