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

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

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 // 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 "V8TestInterfaceConstructor2.h" 8 #include "V8TestInterfaceConstructor2.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 24 matching lines...) Expand all
35 template <typename T> void V8_USE(T) { } 35 template <typename T> void V8_USE(T) { }
36 36
37 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) 37 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
38 { 38 {
39 V8StringResource<> stringArg; 39 V8StringResource<> stringArg;
40 { 40 {
41 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 41 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
42 } 42 }
43 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s tringArg); 43 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s tringArg);
44 v8::Handle<v8::Object> wrapper = info.Holder(); 44 v8::Handle<v8::Object> wrapper = info.Holder();
45 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat e()); 45 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr apper, info.GetIsolate());
46 v8SetReturnValue(info, wrapper); 46 v8SetReturnValue(info, wrapper);
47 } 47 }
48 48
49 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) 49 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
50 { 50 {
51 Dictionary dictionaryArg; 51 Dictionary dictionaryArg;
52 { 52 {
53 v8::TryCatch block; 53 v8::TryCatch block;
54 V8RethrowTryCatchScope rethrow(block); 54 V8RethrowTryCatchScope rethrow(block);
55 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat e())); 55 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat e()));
56 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { 56 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
57 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object." ), info.GetIsolate()); 57 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object." ), info.GetIsolate());
58 return; 58 return;
59 } 59 }
60 } 60 }
61 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d ictionaryArg); 61 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d ictionaryArg);
62 v8::Handle<v8::Object> wrapper = info.Holder(); 62 v8::Handle<v8::Object> wrapper = info.Holder();
63 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat e()); 63 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr apper, info.GetIsolate());
64 v8SetReturnValue(info, wrapper); 64 v8SetReturnValue(info, wrapper);
65 } 65 }
66 66
67 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) 67 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
68 { 68 {
69 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 69 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
70 TestInterfaceEmpty* testInterfaceEmptyArg; 70 TestInterfaceEmpty* testInterfaceEmptyArg;
71 int longArg; 71 int longArg;
72 V8StringResource<> defaultUndefinedOptionalStringArg; 72 V8StringResource<> defaultUndefinedOptionalStringArg;
73 V8StringResource<> defaultNullStringOptionalStringArg; 73 V8StringResource<> defaultNullStringOptionalStringArg;
(...skipping 12 matching lines...) Expand all
86 } 86 }
87 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary (info[4], info.GetIsolate())); 87 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary (info[4], info.GetIsolate()));
88 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau ltUndefinedOptionalDictionaryArg.isObject()) { 88 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau ltUndefinedOptionalDictionaryArg.isObject()) {
89 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona lDictionaryArg') is not an object."); 89 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona lDictionaryArg') is not an object.");
90 exceptionState.throwIfNeeded(); 90 exceptionState.throwIfNeeded();
91 return; 91 return;
92 } 92 }
93 if (UNLIKELY(info.Length() <= 5)) { 93 if (UNLIKELY(info.Length() <= 5)) {
94 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2:: create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); 94 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2:: create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg);
95 v8::Handle<v8::Object> wrapper = info.Holder(); 95 v8::Handle<v8::Object> wrapper = info.Holder();
96 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2 >(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.G etIsolate()); 96 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperType Info, wrapper, info.GetIsolate());
97 v8SetReturnValue(info, wrapper); 97 v8SetReturnValue(info, wrapper);
98 return; 98 return;
99 } 99 }
100 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); 100 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]);
101 } 101 }
102 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); 102 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg);
103 v8::Handle<v8::Object> wrapper = info.Holder(); 103 v8::Handle<v8::Object> wrapper = info.Holder();
104 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat e()); 104 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr apper, info.GetIsolate());
105 v8SetReturnValue(info, wrapper); 105 v8SetReturnValue(info, wrapper);
106 } 106 }
107 107
108 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 108 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
109 { 109 {
110 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 110 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
111 switch (std::min(6, info.Length())) { 111 switch (std::min(6, info.Length())) {
112 case 1: 112 case 1:
113 if (info[0]->IsObject()) { 113 if (info[0]->IsObject()) {
114 TestInterfaceConstructor2V8Internal::constructor2(info); 114 TestInterfaceConstructor2V8Internal::constructor2(info);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 return 0; 232 return 0;
233 } 233 }
234 234
235 template<> 235 template<>
236 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate) 236 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate)
237 { 237 {
238 return toV8(impl, creationContext, isolate); 238 return toV8(impl, creationContext, isolate);
239 } 239 }
240 240
241 } // namespace blink 241 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698