| Index: Source/bindings/tests/results/core/TestInterfaceWillBeGarbageCollectedOrTestDictionary.cpp
|
| diff --git a/Source/bindings/tests/results/core/TestInterfaceWillBeGarbageCollectedOrTestDictionary.cpp b/Source/bindings/tests/results/core/TestInterfaceWillBeGarbageCollectedOrTestDictionary.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..354a45b7d9d07848f4195592a8b107d26245cde2
|
| --- /dev/null
|
| +++ b/Source/bindings/tests/results/core/TestInterfaceWillBeGarbageCollectedOrTestDictionary.cpp
|
| @@ -0,0 +1,107 @@
|
| +// Copyright 2015 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 "config.h"
|
| +#include "TestInterfaceWillBeGarbageCollectedOrTestDictionary.h"
|
| +
|
| +
|
| +namespace blink {
|
| +
|
| +TestInterfaceWillBeGarbageCollectedOrTestDictionary::TestInterfaceWillBeGarbageCollectedOrTestDictionary()
|
| + : m_type(SpecificTypeNone)
|
| +{
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> TestInterfaceWillBeGarbageCollectedOrTestDictionary::getAsTestInterfaceWillBeGarbageCollected() const
|
| +{
|
| + ASSERT(isTestInterfaceWillBeGarbageCollected());
|
| + return m_testInterfaceWillBeGarbageCollected;
|
| +}
|
| +
|
| +void TestInterfaceWillBeGarbageCollectedOrTestDictionary::setTestInterfaceWillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> value)
|
| +{
|
| + ASSERT(isNull());
|
| + m_testInterfaceWillBeGarbageCollected = value;
|
| + m_type = SpecificTypeTestInterfaceWillBeGarbageCollected;
|
| +}
|
| +
|
| +TestInterfaceWillBeGarbageCollectedOrTestDictionary TestInterfaceWillBeGarbageCollectedOrTestDictionary::fromTestInterfaceWillBeGarbageCollected(PassRefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> value)
|
| +{
|
| + TestInterfaceWillBeGarbageCollectedOrTestDictionary container;
|
| + container.setTestInterfaceWillBeGarbageCollected(value);
|
| + return container;
|
| +}
|
| +
|
| +TestDictionary TestInterfaceWillBeGarbageCollectedOrTestDictionary::getAsTestDictionary() const
|
| +{
|
| + ASSERT(isTestDictionary());
|
| + return m_testDictionary;
|
| +}
|
| +
|
| +void TestInterfaceWillBeGarbageCollectedOrTestDictionary::setTestDictionary(TestDictionary value)
|
| +{
|
| + ASSERT(isNull());
|
| + m_testDictionary = value;
|
| + m_type = SpecificTypeTestDictionary;
|
| +}
|
| +
|
| +TestInterfaceWillBeGarbageCollectedOrTestDictionary TestInterfaceWillBeGarbageCollectedOrTestDictionary::fromTestDictionary(TestDictionary value)
|
| +{
|
| + TestInterfaceWillBeGarbageCollectedOrTestDictionary container;
|
| + container.setTestDictionary(value);
|
| + return container;
|
| +}
|
| +
|
| +DEFINE_TRACE(TestInterfaceWillBeGarbageCollectedOrTestDictionary)
|
| +{
|
| + visitor->trace(m_testInterfaceWillBeGarbageCollected);
|
| + visitor->trace(m_testDictionary);
|
| +}
|
| +
|
| +void V8TestInterfaceWillBeGarbageCollectedOrTestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterfaceWillBeGarbageCollectedOrTestDictionary& impl, ExceptionState& exceptionState)
|
| +{
|
| + if (v8Value.IsEmpty())
|
| + return;
|
| +
|
| + if (V8TestInterfaceWillBeGarbageCollected::hasInstance(v8Value, isolate)) {
|
| + RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> cppValue = V8TestInterfaceWillBeGarbageCollected::toImpl(v8::Local<v8::Object>::Cast(v8Value));
|
| + impl.setTestInterfaceWillBeGarbageCollected(cppValue);
|
| + return;
|
| + }
|
| +
|
| + if (isUndefinedOrNull(v8Value) || v8Value->IsObject()) {
|
| + TestDictionary cppValue;
|
| + TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8TestDictionary::toImpl(isolate, v8Value, cppValue, exceptionState), exceptionState);
|
| + impl.setTestDictionary(cppValue);
|
| + return;
|
| + }
|
| +
|
| + exceptionState.throwTypeError("The provided value is not of type '(TestInterfaceWillBeGarbageCollected or TestDictionary)'");
|
| +}
|
| +
|
| +v8::Local<v8::Value> toV8(const TestInterfaceWillBeGarbageCollectedOrTestDictionary& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
|
| +{
|
| + switch (impl.m_type) {
|
| + case TestInterfaceWillBeGarbageCollectedOrTestDictionary::SpecificTypeNone:
|
| + return v8::Null(isolate);
|
| + case TestInterfaceWillBeGarbageCollectedOrTestDictionary::SpecificTypeTestInterfaceWillBeGarbageCollected:
|
| + return toV8(impl.getAsTestInterfaceWillBeGarbageCollected(), creationContext, isolate);
|
| + case TestInterfaceWillBeGarbageCollectedOrTestDictionary::SpecificTypeTestDictionary:
|
| + return toV8(impl.getAsTestDictionary(), creationContext, isolate);
|
| + default:
|
| + ASSERT_NOT_REACHED();
|
| + }
|
| + return v8::Local<v8::Value>();
|
| +}
|
| +
|
| +TestInterfaceWillBeGarbageCollectedOrTestDictionary NativeValueTraits<TestInterfaceWillBeGarbageCollectedOrTestDictionary>::nativeValue(const v8::Local<v8::Value>& value, v8::Isolate* isolate, ExceptionState& exceptionState)
|
| +{
|
| + TestInterfaceWillBeGarbageCollectedOrTestDictionary impl;
|
| + V8TestInterfaceWillBeGarbageCollectedOrTestDictionary::toImpl(isolate, value, impl, exceptionState);
|
| + return impl;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|