| 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 // clang-format off | 8 // clang-format off |
| 9 | 9 |
| 10 #include "VoidCallbackFunctionModules.h" | 10 #include "VoidCallbackFunctionModules.h" |
| 11 | 11 |
| 12 #include "bindings/core/v8/ExceptionState.h" | 12 #include "bindings/core/v8/ExceptionState.h" |
| 13 #include "bindings/core/v8/ScriptState.h" | 13 #include "bindings/core/v8/ScriptState.h" |
| 14 #include "bindings/core/v8/ToV8.h" | 14 #include "bindings/core/v8/ToV8.h" |
| 15 #include "bindings/core/v8/V8Binding.h" | 15 #include "bindings/core/v8/V8Binding.h" |
| 16 #include "core/dom/ExecutionContext.h" | 16 #include "core/dom/ExecutionContext.h" |
| 17 #include "wtf/Assertions.h" | 17 #include "wtf/Assertions.h" |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 VoidCallbackFunctionModules::VoidCallbackFunctionModules(ScriptState* scriptStat
e, v8::Local<v8::Function> callback) | 21 VoidCallbackFunctionModules::VoidCallbackFunctionModules(ScriptState* scriptStat
e, v8::Local<v8::Function> callback) |
| 22 : m_scriptState(scriptState), | 22 : m_scriptState(scriptState), |
| 23 m_callback(scriptState->isolate(), this, callback) { | 23 m_callback(scriptState->isolate(), this, callback) { |
| 24 DCHECK(!m_callback.isEmpty()); | 24 DCHECK(!m_callback.isEmpty()); |
| 25 m_callback.setPhantom(); | |
| 26 } | 25 } |
| 27 | 26 |
| 28 DEFINE_TRACE(VoidCallbackFunctionModules) {} | 27 DEFINE_TRACE(VoidCallbackFunctionModules) {} |
| 29 | 28 |
| 30 DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) { | 29 DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) { |
| 31 visitor->traceWrappers(m_callback.cast<v8::Value>()); | 30 visitor->traceWrappers(m_callback.cast<v8::Value>()); |
| 32 } | 31 } |
| 33 | 32 |
| 34 bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { | 33 bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { |
| 35 if (!m_scriptState->contextIsValid()) | 34 if (!m_scriptState->contextIsValid()) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 56 v8::TryCatch exceptionCatcher(m_scriptState->isolate()); | 55 v8::TryCatch exceptionCatcher(m_scriptState->isolate()); |
| 57 exceptionCatcher.SetVerbose(true); | 56 exceptionCatcher.SetVerbose(true); |
| 58 | 57 |
| 59 if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate())
, m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isola
te()).ToLocal(&v8ReturnValue)) { | 58 if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate())
, m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isola
te()).ToLocal(&v8ReturnValue)) { |
| 60 return true; | 59 return true; |
| 61 } | 60 } |
| 62 return false; | 61 return false; |
| 63 } | 62 } |
| 64 | 63 |
| 65 } // namespace blink | 64 } // namespace blink |
| OLD | NEW |