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

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

Issue 131973012: Add overload support for non-wrapper type vs. primitive type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat e(), WrapperConfiguration::Dependent); 97 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat e(), WrapperConfiguration::Dependent);
98 v8SetReturnValue(info, wrapper); 98 v8SetReturnValue(info, wrapper);
99 } 99 }
100 100
101 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 101 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
102 { 102 {
103 if (((info.Length() == 1))) { 103 if (((info.Length() == 1))) {
104 TestInterfaceConstructor2V8Internal::constructor1(info); 104 TestInterfaceConstructor2V8Internal::constructor1(info);
105 return; 105 return;
106 } 106 }
107 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate(), worldType(info.GetIsolate())))) || ((info.Length() == 2) && (V8T estInterfaceEmpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIso late())))) || ((info.Length() == 3) && (V8TestInterfaceEmpty::hasInstance(info[0 ], info.GetIsolate(), worldType(info.GetIsolate())))) || ((info.Length() == 4) & & (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate(), worldType(info. GetIsolate()))))) { 107 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate(), worldType(info.GetIsolate())))) || ((info.Length() == 2) && (V8T estInterfaceEmpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIso late())))) || ((info.Length() == 3) && (V8TestInterfaceEmpty::hasInstance(info[0 ], info.GetIsolate(), worldType(info.GetIsolate())))) || ((info.Length() == 4) & & (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate(), worldType(info. GetIsolate()))) && (info[3]->IsObject()))) {
108 TestInterfaceConstructor2V8Internal::constructor2(info); 108 TestInterfaceConstructor2V8Internal::constructor2(info);
109 return; 109 return;
110 } 110 }
111 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 111 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
112 if (UNLIKELY(info.Length() < 1)) { 112 if (UNLIKELY(info.Length() < 1)) {
113 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 113 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
114 exceptionState.throwIfNeeded(); 114 exceptionState.throwIfNeeded();
115 return; 115 return;
116 } 116 }
117 exceptionState.throwTypeError("No matching constructor signature."); 117 exceptionState.throwTypeError("No matching constructor signature.");
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 fromInternalPointer(object)->deref(); 207 fromInternalPointer(object)->deref();
208 } 208 }
209 209
210 template<> 210 template<>
211 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate) 211 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate)
212 { 212 {
213 return toV8(impl, creationContext, isolate); 213 return toV8(impl, creationContext, isolate);
214 } 214 }
215 215
216 } // namespace WebCore 216 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceConstructor.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698