OLD | NEW |
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e(), WrapperConfiguration::Dependent); | 99 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e(), WrapperConfiguration::Dependent); |
100 v8SetReturnValue(info, wrapper); | 100 v8SetReturnValue(info, wrapper); |
101 } | 101 } |
102 | 102 |
103 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 103 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
104 { | 104 { |
105 if (((info.Length() == 1))) { | 105 if (((info.Length() == 1))) { |
106 TestInterfaceConstructor2V8Internal::constructor1(info); | 106 TestInterfaceConstructor2V8Internal::constructor1(info); |
107 return; | 107 return; |
108 } | 108 } |
109 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate()))) || ((info.Length() == 2) && (V8TestInterfaceEmpty::hasInstance
(info[0], info.GetIsolate()))) || ((info.Length() == 3) && (V8TestInterfaceEmpty
::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 4) && (V8TestI
nterfaceEmpty::hasInstance(info[0], info.GetIsolate())) && (info[3]->IsObject())
)) { | 109 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate()))) || ((info.Length() == 2) && (V8TestInterfaceEmpty::hasInstance
(info[0], info.GetIsolate()))) || ((info.Length() == 3) && (V8TestInterfaceEmpty
::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 4) && (V8TestI
nterfaceEmpty::hasInstance(info[0], info.GetIsolate())) && (info[3]->IsUndefined
() || info[3]->IsObject()))) { |
110 TestInterfaceConstructor2V8Internal::constructor2(info); | 110 TestInterfaceConstructor2V8Internal::constructor2(info); |
111 return; | 111 return; |
112 } | 112 } |
113 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 113 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
114 if (UNLIKELY(info.Length() < 1)) { | 114 if (UNLIKELY(info.Length() < 1)) { |
115 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 115 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
116 exceptionState.throwIfNeeded(); | 116 exceptionState.throwIfNeeded(); |
117 return; | 117 return; |
118 } | 118 } |
119 exceptionState.throwTypeError("No matching constructor signature."); | 119 exceptionState.throwTypeError("No matching constructor signature."); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 fromInternalPointer(object)->deref(); | 203 fromInternalPointer(object)->deref(); |
204 } | 204 } |
205 | 205 |
206 template<> | 206 template<> |
207 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 207 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
208 { | 208 { |
209 return toV8(impl, creationContext, isolate); | 209 return toV8(impl, creationContext, isolate); |
210 } | 210 } |
211 | 211 |
212 } // namespace WebCore | 212 } // namespace WebCore |
OLD | NEW |