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

Side by Side Diff: Source/core/inspector/InspectorTaskRunner.h

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/core.gypi ('k') | Source/core/inspector/InspectorTaskRunner.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef InspectorTaskRunner_h
6 #define InspectorTaskRunner_h
7
8 #include "wtf/Forward.h"
9 #include "wtf/Noncopyable.h"
10 #include "wtf/OwnPtr.h"
11 #include "wtf/PassOwnPtr.h"
12 #include <v8.h>
13
14 namespace blink {
15
16 class InspectorTaskRunner final {
17 WTF_MAKE_NONCOPYABLE(InspectorTaskRunner);
18 public:
19 explicit InspectorTaskRunner(v8::Isolate*);
20 ~InspectorTaskRunner();
21
22 class Task {
23 public:
24 virtual ~Task() { }
25 virtual void run() = 0;
26 };
27 // This method can be called on any thread. It is caller's responsibility to make sure that
28 // this V8Debugger and corresponding v8::Isolate exist while this method is running.
29 void interruptAndRun(PassOwnPtr<Task>);
30 void runPendingTasks();
31
32 void setIgnoreInterrupts(bool ignore) { m_ignoreInterrupts = ignore; }
33
34 private:
35 static void v8InterruptCallback(v8::Isolate*, void* data);
36
37 v8::Isolate* m_isolate;
38 class ThreadSafeTaskQueue;
39 OwnPtr<ThreadSafeTaskQueue> m_taskQueue;
40 bool m_ignoreInterrupts;
41 };
42
43 } // namespace blink
44
45
46 #endif // !defined(InspectorTaskRunner_h)
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/InspectorTaskRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698