OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef Microtask_h | 31 #ifndef Microtask_h |
32 #define Microtask_h | 32 #define Microtask_h |
33 | 33 |
34 #include "bindings/core/v8/ScriptState.h" | |
vivekg
2015/05/27 14:59:37
nit: Do we need to include ScriptState.h here?
| |
34 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
35 #include "public/platform/WebThread.h" | 36 #include "public/platform/WebThread.h" |
36 #include "wtf/Functional.h" | 37 #include "wtf/Functional.h" |
37 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
38 #include <v8.h> | 39 #include <v8.h> |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 class CORE_EXPORT Microtask { | 43 class CORE_EXPORT Microtask { |
43 public: | 44 public: |
44 static void performCheckpoint(); | 45 static void performCheckpoint(v8::Isolate*); |
45 static bool performingCheckpoint(v8::Isolate*); | 46 static bool performingCheckpoint(v8::Isolate*); |
46 static void enqueueMicrotask(PassOwnPtr<WebThread::Task>); | 47 static void enqueueMicrotask(PassOwnPtr<WebThread::Task>); |
47 static void enqueueMicrotask(PassOwnPtr<Closure>); | 48 static void enqueueMicrotask(PassOwnPtr<Closure>); |
48 | 49 |
49 private: | 50 private: |
50 explicit Microtask(); | 51 explicit Microtask(); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace blink | 54 } // namespace blink |
54 | 55 |
55 #endif // Microtask_h | 56 #endif // Microtask_h |
OLD | NEW |