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

Unified Diff: Source/core/inspector/InspectorTaskRunner.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorTaskRunner.h ('k') | Source/core/inspector/WorkerInspectorController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTaskRunner.cpp
diff --git a/Source/core/inspector/InspectorTaskRunner.cpp b/Source/core/inspector/InspectorTaskRunner.cpp
index 34143455da079aeecbbfb4be613404702f6a4d4b..807833d2a2bdf0345bbbba310f445bdee589497d 100644
--- a/Source/core/inspector/InspectorTaskRunner.cpp
+++ b/Source/core/inspector/InspectorTaskRunner.cpp
@@ -11,6 +11,19 @@
namespace blink {
+InspectorTaskRunner::IgnoreInterruptsScope::IgnoreInterruptsScope(InspectorTaskRunner* taskRunner)
+ : m_wasIgnoring(taskRunner->m_ignoreInterrupts)
+ , m_taskRunner(taskRunner)
+{
+ // There may be nested scopes e.g. when tasks are being executed on XHR breakpoint.
+ m_taskRunner->m_ignoreInterrupts = true;
+}
+
+InspectorTaskRunner::IgnoreInterruptsScope::~IgnoreInterruptsScope()
+{
+ m_taskRunner->m_ignoreInterrupts = m_wasIgnoring;
+}
+
class InspectorTaskRunner::ThreadSafeTaskQueue {
WTF_MAKE_NONCOPYABLE(ThreadSafeTaskQueue);
public:
« no previous file with comments | « Source/core/inspector/InspectorTaskRunner.h ('k') | Source/core/inspector/WorkerInspectorController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698