OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WorkerScriptController_h | 31 #ifndef WorkerScriptController_h |
32 #define WorkerScriptController_h | 32 #define WorkerScriptController_h |
33 | 33 |
34 #include "bindings/core/v8/RejectedPromises.h" | 34 #include "bindings/core/v8/RejectedPromises.h" |
35 #include "bindings/core/v8/ScriptValue.h" | 35 #include "bindings/core/v8/ScriptValue.h" |
36 #include "bindings/core/v8/V8Binding.h" | 36 #include "bindings/core/v8/V8Binding.h" |
37 #include "bindings/core/v8/V8CacheOptions.h" | 37 #include "bindings/core/v8/V8CacheOptions.h" |
38 #include "core/CoreExport.h" | 38 #include "core/CoreExport.h" |
| 39 #include "wtf/Allocator.h" |
39 #include "wtf/OwnPtr.h" | 40 #include "wtf/OwnPtr.h" |
40 #include "wtf/ThreadingPrimitives.h" | 41 #include "wtf/ThreadingPrimitives.h" |
41 #include "wtf/text/TextPosition.h" | 42 #include "wtf/text/TextPosition.h" |
42 #include <v8.h> | 43 #include <v8.h> |
43 | 44 |
44 namespace blink { | 45 namespace blink { |
45 | 46 |
46 class CachedMetadataHandler; | 47 class CachedMetadataHandler; |
47 class ErrorEvent; | 48 class ErrorEvent; |
48 class ExceptionState; | 49 class ExceptionState; |
49 class ScriptSourceCode; | 50 class ScriptSourceCode; |
50 class WorkerGlobalScope; | 51 class WorkerGlobalScope; |
51 | 52 |
52 class CORE_EXPORT WorkerScriptController : public NoBaseWillBeGarbageCollectedFi
nalized<WorkerScriptController> { | 53 class CORE_EXPORT WorkerScriptController : public NoBaseWillBeGarbageCollectedFi
nalized<WorkerScriptController> { |
| 54 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(WorkerScriptController); |
| 55 WTF_MAKE_NONCOPYABLE(WorkerScriptController); |
53 public: | 56 public: |
54 static PassOwnPtrWillBeRawPtr<WorkerScriptController> create(WorkerGlobalSco
pe*, v8::Isolate*); | 57 static PassOwnPtrWillBeRawPtr<WorkerScriptController> create(WorkerGlobalSco
pe*, v8::Isolate*); |
55 virtual ~WorkerScriptController(); | 58 virtual ~WorkerScriptController(); |
56 void dispose(); | 59 void dispose(); |
57 | 60 |
58 bool isExecutionForbidden() const; | 61 bool isExecutionForbidden() const; |
59 bool isExecutionTerminating() const; | 62 bool isExecutionTerminating() const; |
60 | 63 |
61 // Returns true if the evaluation completed with no uncaught exception. | 64 // Returns true if the evaluation completed with no uncaught exception. |
62 bool evaluate(const ScriptSourceCode&, RefPtrWillBeRawPtr<ErrorEvent>* = nul
lptr, CachedMetadataHandler* = nullptr, V8CacheOptions = V8CacheOptionsDefault); | 65 bool evaluate(const ScriptSourceCode&, RefPtrWillBeRawPtr<ErrorEvent>* = nul
lptr, CachedMetadataHandler* = nullptr, V8CacheOptions = V8CacheOptionsDefault); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // kept as a bare pointer here, and not a Persistent with | 118 // kept as a bare pointer here, and not a Persistent with |
116 // Oilpan enabled; stack scanning will visit the object and | 119 // Oilpan enabled; stack scanning will visit the object and |
117 // trace its on-heap fields. | 120 // trace its on-heap fields. |
118 GC_PLUGIN_IGNORE("394615") | 121 GC_PLUGIN_IGNORE("394615") |
119 WorkerGlobalScopeExecutionState* m_globalScopeExecutionState; | 122 WorkerGlobalScopeExecutionState* m_globalScopeExecutionState; |
120 }; | 123 }; |
121 | 124 |
122 } // namespace blink | 125 } // namespace blink |
123 | 126 |
124 #endif // WorkerScriptController_h | 127 #endif // WorkerScriptController_h |
OLD | NEW |