| Index: third_party/WebKit/Source/bindings/tests/results/core/V8VoidCallbackFunction2.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8VoidCallbackFunction2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8VoidCallbackFunction2.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dd618dc72ecce4ea90a959a61516dda355e53c68
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8VoidCallbackFunction2.cpp
|
| @@ -0,0 +1,49 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
|
| +
|
| +#include "V8VoidCallbackFunction2.h"
|
| +
|
| +#include "wtf/Assertions.h"
|
| +#include "bindings/core/v8/ScriptState.h"
|
| +#include "bindings/core/v8/V8Binding.h"
|
| +
|
| +namespace blink {
|
| +
|
| +V8VoidCallbackFunction2::V8VoidCallbackFunction2(v8::Local<v8::Function> callback, ScriptState* scriptState)
|
| + : m_callback(scriptState->isolate(), callback)
|
| + , m_scriptState(scriptState)
|
| +{
|
| + m_callback.setPhantom();
|
| +}
|
| +
|
| +DEFINE_TRACE(V8VoidCallbackFunction2)
|
| +{
|
| +}
|
| +
|
| +bool V8VoidCallbackFunction2::call(ScriptValue thisValue)
|
| +{
|
| + if (!m_scriptState->contextIsValid())
|
| + return false;
|
| +
|
| + ScriptState::Scope scope(m_scriptState.get());
|
| +
|
| + if (m_callback.isEmpty())
|
| + return false;
|
| +
|
| + v8::Local<v8::Value> *argv = 0;
|
| +
|
| + v8::Local<v8::Value> currentValue;
|
| + v8::TryCatch exceptionCatcher(m_scriptState->isolate());
|
| + exceptionCatcher.SetVerbose(true);
|
| + if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), m_scriptState->context()->Global(), 0, argv, m_scriptState->isolate()).ToLocal(¤tValue))
|
| + {
|
| + returnValue = cppValue;
|
| + return true;
|
| + }
|
| + else { return false; }
|
| +}
|
| +
|
| +} // namespace blink
|
|
|