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 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestInterfaceWillBeGarbageCollected.h" | 8 #include "V8TestInterfaceWillBeGarbageCollected.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 82 } |
83 | 83 |
84 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 84 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
85 { | 85 { |
86 if (UNLIKELY(info.Length() < 1)) { | 86 if (UNLIKELY(info.Length() < 1)) { |
87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); | 87 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); |
88 return; | 88 return; |
89 } | 89 } |
90 V8StringResource<> str; | 90 V8StringResource<> str; |
91 { | 91 { |
92 TOSTRING_VOID_INTERNAL(str, info[0]); | 92 str = info[0]; |
| 93 if (!str.prepare()) |
| 94 return; |
93 } | 95 } |
94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 96 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
95 v8::Local<v8::Object> wrapper = info.Holder(); | 97 v8::Local<v8::Object> wrapper = info.Holder(); |
96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); | 98 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); |
97 v8SetReturnValue(info, wrapper); | 99 v8SetReturnValue(info, wrapper); |
98 } | 100 } |
99 | 101 |
100 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal | 102 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal |
101 | 103 |
102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { | 104 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { |
(...skipping 12 matching lines...) Expand all Loading... |
115 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 117 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
116 v8SetReturnValue(info, info.Holder()); | 118 v8SetReturnValue(info, info.Holder()); |
117 return; | 119 return; |
118 } | 120 } |
119 if (UNLIKELY(info.Length() < 1)) { | 121 if (UNLIKELY(info.Length() < 1)) { |
120 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); | 122 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceWillBeGarbageCollected", 1, info.Length()),
info.GetIsolate()); |
121 return; | 123 return; |
122 } | 124 } |
123 V8StringResource<> str; | 125 V8StringResource<> str; |
124 { | 126 { |
125 TOSTRING_VOID_INTERNAL(str, info[0]); | 127 str = info[0]; |
| 128 if (!str.prepare()) |
| 129 return; |
126 } | 130 } |
127 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); | 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); |
128 v8::Local<v8::Object> wrapper = info.Holder(); | 132 v8::Local<v8::Object> wrapper = info.Holder(); |
129 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollectedConstructor::wrapperTypeInfo, wrapper); | 133 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollectedConstructor::wrapperTypeInfo, wrapper); |
130 v8SetReturnValue(info, wrapper); | 134 v8SetReturnValue(info, wrapper); |
131 } | 135 } |
132 | 136 |
133 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructor
::domTemplate(v8::Isolate* isolate) | 137 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructor
::domTemplate(v8::Isolate* isolate) |
134 { | 138 { |
135 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 139 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 220 } |
217 | 221 |
218 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) | 222 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) |
219 { | 223 { |
220 #if !ENABLE(OILPAN) | 224 #if !ENABLE(OILPAN) |
221 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); | 225 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); |
222 #endif | 226 #endif |
223 } | 227 } |
224 | 228 |
225 } // namespace blink | 229 } // namespace blink |
OLD | NEW |