OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | |
6 | |
7 // clang-format off | |
8 | |
9 #ifndef V8VoidCallbackFunctionModules_h | |
10 #define V8VoidCallbackFunctionModules_h | |
11 | |
12 #include "bindings/core/v8/ExceptionState.h" | |
13 #include "bindings/core/v8/ScopedPersistent.h" | |
14 #include "modules/ModulesExport.h" | |
15 #include "platform/heap/Handle.h" | |
16 #include "wtf/text/WTFString.h" | |
17 | |
18 namespace blink { | |
19 | |
20 class ScriptState; | |
21 | |
22 class MODULES_EXPORT V8VoidCallbackFunctionModules final : public GarbageCollect
edFinalized<V8VoidCallbackFunctionModules> { | |
23 public: | |
24 static V8VoidCallbackFunctionModules* create(v8::Isolate* isolate, v8::Local
<v8::Function> callback) | |
25 { | |
26 return new V8VoidCallbackFunctionModules(isolate, callback); | |
27 } | |
28 | |
29 ~V8VoidCallbackFunctionModules() = default; | |
30 | |
31 DECLARE_TRACE(); | |
32 | |
33 bool call(ScriptState* scriptState, ScriptWrappable* scriptWrappable, Except
ionState& exceptionState); | |
34 | |
35 v8::Local<v8::Function> v8Value(v8::Isolate* isolate) | |
36 { | |
37 return m_callback.newLocal(isolate); | |
38 } | |
39 | |
40 void setWrapperReference(v8::Isolate* isolate, const v8::Persistent<v8::Obje
ct>& wrapper) | |
41 { | |
42 DCHECK(!m_callback.isEmpty()); | |
43 m_callback.setReference(wrapper, isolate); | |
44 } | |
45 | |
46 private: | |
47 V8VoidCallbackFunctionModules(v8::Isolate* isolate, v8::Local<v8::Function>)
; | |
48 ScopedPersistent<v8::Function> m_callback; | |
49 }; | |
50 | |
51 } // namespace blink | |
52 | |
53 #endif // V8VoidCallbackFunctionModules_h | |
OLD | NEW |