| 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. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 // clang-format off | 7 // clang-format off |
| 8 | 8 |
| 9 #include "V8VoidCallbackFunctionModules.h" | 9 #include "VoidCallbackFunctionModules.h" |
| 10 | 10 |
| 11 #include "bindings/core/v8/ScriptState.h" | 11 #include "bindings/core/v8/ScriptState.h" |
| 12 #include "bindings/core/v8/ToV8.h" | 12 #include "bindings/core/v8/ToV8.h" |
| 13 #include "bindings/core/v8/V8Binding.h" | 13 #include "bindings/core/v8/V8Binding.h" |
| 14 #include "core/dom/ExecutionContext.h" | 14 #include "core/dom/ExecutionContext.h" |
| 15 #include "wtf/Assertions.h" | 15 #include "wtf/Assertions.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 V8VoidCallbackFunctionModules::V8VoidCallbackFunctionModules(v8::Isolate* isolat
e, v8::Local<v8::Function> callback) | 19 VoidCallbackFunctionModules::VoidCallbackFunctionModules(v8::Isolate* isolate, v
8::Local<v8::Function> callback) |
| 20 : m_callback(isolate, callback) | 20 : m_callback(isolate, callback) |
| 21 { | 21 { |
| 22 DCHECK(!m_callback.isEmpty()); | 22 DCHECK(!m_callback.isEmpty()); |
| 23 m_callback.setPhantom(); | 23 m_callback.setPhantom(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 DEFINE_TRACE(V8VoidCallbackFunctionModules) | 26 DEFINE_TRACE(VoidCallbackFunctionModules) |
| 27 { | 27 { |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool V8VoidCallbackFunctionModules::call(ScriptState* scriptState, ScriptWrappab
le* scriptWrappable, ExceptionState& exceptionState) | 30 bool VoidCallbackFunctionModules::call(ScriptState* scriptState, ScriptWrappable
* scriptWrappable, ExceptionState& exceptionState) |
| 31 { | 31 { |
| 32 if (!scriptState->contextIsValid()) | 32 if (!scriptState->contextIsValid()) |
| 33 return false; | 33 return false; |
| 34 | 34 |
| 35 ExecutionContext* context = scriptState->getExecutionContext(); | 35 ExecutionContext* context = scriptState->getExecutionContext(); |
| 36 DCHECK(context); | 36 DCHECK(context); |
| 37 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreS
topped()) | 37 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreS
topped()) |
| 38 return false; | 38 return false; |
| 39 | 39 |
| 40 if (m_callback.isEmpty()) | 40 if (m_callback.isEmpty()) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 exceptionCatcher.SetVerbose(true); | 51 exceptionCatcher.SetVerbose(true); |
| 52 | 52 |
| 53 if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate())
, scriptState->getExecutionContext(), thisValue, 0, argv, scriptState->isolate()
).ToLocal(&v8ReturnValue)) | 53 if (V8ScriptRunner::callFunction(m_callback.newLocal(scriptState->isolate())
, scriptState->getExecutionContext(), thisValue, 0, argv, scriptState->isolate()
).ToLocal(&v8ReturnValue)) |
| 54 { | 54 { |
| 55 return true; | 55 return true; |
| 56 } | 56 } |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace blink | 60 } // namespace blink |
| OLD | NEW |