| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
| 6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
| 7 | 7 |
| 8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
| 9 // third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl |
| 10 | 10 |
| 11 // clang-format off | 11 // clang-format off |
| 12 | 12 |
| 13 #include "VoidCallbackFunctionModules.h" | 13 #include "VoidCallbackFunctionModules.h" |
| 14 | 14 |
| 15 #include "bindings/core/v8/ExceptionState.h" | 15 #include "bindings/core/v8/ExceptionState.h" |
| 16 #include "bindings/core/v8/ScriptState.h" | 16 #include "bindings/core/v8/ScriptState.h" |
| 17 #include "bindings/core/v8/ToV8ForCore.h" | 17 #include "bindings/core/v8/ToV8ForCore.h" |
| 18 #include "bindings/core/v8/V8Binding.h" | 18 #include "bindings/core/v8/V8BindingForCore.h" |
| 19 #include "core/dom/ExecutionContext.h" | 19 #include "core/dom/ExecutionContext.h" |
| 20 #include "platform/wtf/Assertions.h" | 20 #include "platform/wtf/Assertions.h" |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 | 23 |
| 24 // static | 24 // static |
| 25 VoidCallbackFunctionModules* VoidCallbackFunctionModules::Create(ScriptState* sc
riptState, v8::Local<v8::Value> callback) { | 25 VoidCallbackFunctionModules* VoidCallbackFunctionModules::Create(ScriptState* sc
riptState, v8::Local<v8::Value> callback) { |
| 26 if (IsUndefinedOrNull(callback)) | 26 if (IsUndefinedOrNull(callback)) |
| 27 return nullptr; | 27 return nullptr; |
| 28 return new VoidCallbackFunctionModules(scriptState, v8::Local<v8::Function>::C
ast(callback)); | 28 return new VoidCallbackFunctionModules(scriptState, v8::Local<v8::Function>::C
ast(callback)); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 VoidCallbackFunctionModules* NativeValueTraits<VoidCallbackFunctionModules>::Nat
iveValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& excep
tionState) { | 81 VoidCallbackFunctionModules* NativeValueTraits<VoidCallbackFunctionModules>::Nat
iveValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& excep
tionState) { |
| 82 VoidCallbackFunctionModules* nativeValue = VoidCallbackFunctionModules::Create
(ScriptState::Current(isolate), value); | 82 VoidCallbackFunctionModules* nativeValue = VoidCallbackFunctionModules::Create
(ScriptState::Current(isolate), value); |
| 83 if (!nativeValue) { | 83 if (!nativeValue) { |
| 84 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( | 84 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( |
| 85 "VoidCallbackFunctionModules")); | 85 "VoidCallbackFunctionModules")); |
| 86 } | 86 } |
| 87 return nativeValue; | 87 return nativeValue; |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |