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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor.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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( ), WrapperConfiguration::Dependent); 116 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate( ), WrapperConfiguration::Dependent);
117 v8SetReturnValue(info, wrapper); 117 v8SetReturnValue(info, wrapper);
118 } 118 }
119 119
120 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 120 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
121 { 121 {
122 if (((info.Length() == 0))) { 122 if (((info.Length() == 0))) {
123 TestInterfaceConstructorV8Internal::constructor1(info); 123 TestInterfaceConstructorV8Internal::constructor1(info);
124 return; 124 return;
125 } 125 }
126 if (((info.Length() == 5) && (V8TestInterfaceEmpty::hasInstance(info[2], inf o.GetIsolate(), worldType(info.GetIsolate()))) && (info[4]->IsArray())) || ((inf o.Length() == 6) && (V8TestInterfaceEmpty::hasInstance(info[2], info.GetIsolate( ), worldType(info.GetIsolate()))) && (info[4]->IsArray())) || ((info.Length() == 7) && (V8TestInterfaceEmpty::hasInstance(info[2], info.GetIsolate(), worldType( info.GetIsolate()))) && (info[4]->IsArray()) && (V8TestInterfaceEmpty::hasInstan ce(info[6], info.GetIsolate(), worldType(info.GetIsolate()))))) { 126 if (((info.Length() == 5) && (V8TestInterfaceEmpty::hasInstance(info[2], inf o.GetIsolate(), worldType(info.GetIsolate()))) && (info[3]->IsObject()) && (info [4]->IsArray())) || ((info.Length() == 6) && (V8TestInterfaceEmpty::hasInstance( info[2], info.GetIsolate(), worldType(info.GetIsolate()))) && (info[3]->IsObject ()) && (info[4]->IsArray()) && (info[5]->IsObject())) || ((info.Length() == 7) & & (V8TestInterfaceEmpty::hasInstance(info[2], info.GetIsolate(), worldType(info. GetIsolate()))) && (info[3]->IsObject()) && (info[4]->IsArray()) && (info[5]->Is Object()) && (V8TestInterfaceEmpty::hasInstance(info[6], info.GetIsolate(), worl dType(info.GetIsolate()))))) {
127 TestInterfaceConstructorV8Internal::constructor2(info); 127 TestInterfaceConstructorV8Internal::constructor2(info);
128 return; 128 return;
129 } 129 }
130 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstructo r", "No matching constructor signature."), info.GetIsolate()); 130 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstructo r", "No matching constructor signature."), info.GetIsolate());
131 } 131 }
132 132
133 } // namespace TestInterfaceConstructorV8Internal 133 } // namespace TestInterfaceConstructorV8Internal
134 134
135 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 135 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
136 { 136 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 fromInternalPointer(object)->deref(); 220 fromInternalPointer(object)->deref();
221 } 221 }
222 222
223 template<> 223 template<>
224 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 224 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
225 { 225 {
226 return toV8(impl, creationContext, isolate); 226 return toV8(impl, creationContext, isolate);
227 } 227 }
228 228
229 } // namespace WebCore 229 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698