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

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

Issue 112303003: IDL compiler: [Constructor] overloading (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Formatting Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, string, info[0]); 107 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, string, info[0]);
108 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (string); 108 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (string);
109 v8::Handle<v8::Object> wrapper = info.Holder(); 109 v8::Handle<v8::Object> wrapper = info.Holder();
110 110
111 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, info.GetIsol ate(), WrapperConfiguration::Dependent); 111 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, info.GetIsol ate(), WrapperConfiguration::Dependent);
112 v8SetReturnValue(info, wrapper); 112 v8SetReturnValue(info, wrapper);
113 } 113 }
114 114
115 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 115 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
116 { 116 {
117 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestOver loadedConstructors", info.Holder(), info.GetIsolate());
118 if (((info.Length() == 1) && (V8ArrayBuffer::hasInstance(info[0], info.GetIs olate(), worldType(info.GetIsolate()))))) { 117 if (((info.Length() == 1) && (V8ArrayBuffer::hasInstance(info[0], info.GetIs olate(), worldType(info.GetIsolate()))))) {
119 TestOverloadedConstructorsV8Internal::constructor1(info); 118 TestOverloadedConstructorsV8Internal::constructor1(info);
120 return; 119 return;
121 } 120 }
122 if (((info.Length() == 1) && (V8ArrayBufferView::hasInstance(info[0], info.G etIsolate(), worldType(info.GetIsolate()))))) { 121 if (((info.Length() == 1) && (V8ArrayBufferView::hasInstance(info[0], info.G etIsolate(), worldType(info.GetIsolate()))))) {
123 TestOverloadedConstructorsV8Internal::constructor2(info); 122 TestOverloadedConstructorsV8Internal::constructor2(info);
124 return; 123 return;
125 } 124 }
126 if (((info.Length() == 1) && (V8Blob::hasInstance(info[0], info.GetIsolate() , worldType(info.GetIsolate()))))) { 125 if (((info.Length() == 1) && (V8Blob::hasInstance(info[0], info.GetIsolate() , worldType(info.GetIsolate()))))) {
127 TestOverloadedConstructorsV8Internal::constructor3(info); 126 TestOverloadedConstructorsV8Internal::constructor3(info);
128 return; 127 return;
129 } 128 }
130 if (((info.Length() == 1))) { 129 if (((info.Length() == 1))) {
131 TestOverloadedConstructorsV8Internal::constructor4(info); 130 TestOverloadedConstructorsV8Internal::constructor4(info);
132 return; 131 return;
133 } 132 }
133 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestOver loadedConstructors", info.Holder(), info.GetIsolate());
134 if (UNLIKELY(info.Length() < 1)) { 134 if (UNLIKELY(info.Length() < 1)) {
135 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 135 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
136 exceptionState.throwIfNeeded(); 136 exceptionState.throwIfNeeded();
137 return; 137 return;
138 } 138 }
139 exceptionState.throwTypeError("No matching constructor signature."); 139 exceptionState.throwTypeError("No matching constructor signature.");
140 exceptionState.throwIfNeeded(); 140 exceptionState.throwIfNeeded();
141 } 141 }
142 142
143 } // namespace TestOverloadedConstructorsV8Internal 143 } // namespace TestOverloadedConstructorsV8Internal
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 fromInternalPointer(object)->deref(); 230 fromInternalPointer(object)->deref();
231 } 231 }
232 232
233 template<> 233 template<>
234 v8::Handle<v8::Value> toV8NoInline(TestOverloadedConstructors* impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate) 234 v8::Handle<v8::Value> toV8NoInline(TestOverloadedConstructors* impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate)
235 { 235 {
236 return toV8(impl, creationContext, isolate); 236 return toV8(impl, creationContext, isolate);
237 } 237 }
238 238
239 } // namespace WebCore 239 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698