Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp

Issue 349523004: IDL: Generate all constructor callbacks with the same template macro (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix arity check Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/tests/v8/V8TestInterfaceWillBeGarbageCollected.h" 10 #include "bindings/tests/v8/V8TestInterfaceWillBeGarbageCollected.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 v8::Isolate* isolate = info.GetIsolate(); 131 v8::Isolate* isolate = info.GetIsolate();
132 if (!info.IsConstructCall()) { 132 if (!info.IsConstructCall()) {
133 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test Interface"), isolate); 133 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test Interface"), isolate);
134 return; 134 return;
135 } 135 }
136 136
137 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject ) { 137 if (ConstructorMode::current(isolate) == ConstructorMode::WrapExistingObject ) {
138 v8SetReturnValue(info, info.Holder()); 138 v8SetReturnValue(info, info.Holder());
139 return; 139 return;
140 } 140 }
141
142 Document& document = *toDocument(currentExecutionContext(isolate));
143
144 if (UNLIKELY(info.Length() < 1)) { 141 if (UNLIKELY(info.Length() < 1)) {
145 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl ected", 1, info.Length(), info.GetIsolate()); 142 throwMinimumArityTypeErrorForConstructor("TestInterfaceWillBeGarbageColl ected", 1, info.Length(), info.GetIsolate());
146 return; 143 return;
147 } 144 }
148 V8StringResource<> str; 145 V8StringResource<> str;
149 { 146 {
150 TOSTRING_VOID_INTERNAL(str, info[0]); 147 TOSTRING_VOID_INTERNAL(str, info[0]);
151 } 148 }
152 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::createForJSConstructor(str); 149 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::createForJSConstructor(str);
153 150
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 #endif // !ENABLE(OILPAN) 265 #endif // !ENABLE(OILPAN)
269 } 266 }
270 267
271 template<> 268 template<>
272 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 269 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
273 { 270 {
274 return toV8(impl, creationContext, isolate); 271 return toV8(impl, creationContext, isolate);
275 } 272 }
276 273
277 } // namespace WebCore 274 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698