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

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

Issue 819853002: [bindings] Translate all assignments in bindings/templates to use Local<> in place of Handle<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 21 matching lines...) Expand all
32 32
33 namespace TestInterfaceConstructor2V8Internal { 33 namespace TestInterfaceConstructor2V8Internal {
34 34
35 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) 35 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
36 { 36 {
37 V8StringResource<> stringArg; 37 V8StringResource<> stringArg;
38 { 38 {
39 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 39 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
40 } 40 }
41 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s tringArg); 41 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s tringArg);
42 v8::Handle<v8::Object> wrapper = info.Holder(); 42 v8::Local<v8::Object> wrapper = info.Holder();
43 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper); 43 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper);
44 v8SetReturnValue(info, wrapper); 44 v8SetReturnValue(info, wrapper);
45 } 45 }
46 46
47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) 47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
48 { 48 {
49 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 49 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
50 Dictionary dictionaryArg; 50 Dictionary dictionaryArg;
51 { 51 {
52 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 52 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
53 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not an object."); 53 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not an object.");
54 exceptionState.throwIfNeeded(); 54 exceptionState.throwIfNeeded();
55 return; 55 return;
56 } 56 }
57 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolate(), exceptionState), exceptionState); 57 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolate(), exceptionState), exceptionState);
58 } 58 }
59 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d ictionaryArg); 59 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d ictionaryArg);
60 v8::Handle<v8::Object> wrapper = info.Holder(); 60 v8::Local<v8::Object> wrapper = info.Holder();
61 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper); 61 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper);
62 v8SetReturnValue(info, wrapper); 62 v8SetReturnValue(info, wrapper);
63 } 63 }
64 64
65 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) 65 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
66 { 66 {
67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
68 Vector<Vector<String> > stringSequenceSequenceArg; 68 Vector<Vector<String> > stringSequenceSequenceArg;
69 { 69 {
70 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringSequenceSequenceArg, toImplA rray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionSt ate); 70 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringSequenceSequenceArg, toImplA rray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionSt ate);
71 } 71 }
72 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s tringSequenceSequenceArg); 72 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s tringSequenceSequenceArg);
73 v8::Handle<v8::Object> wrapper = info.Holder(); 73 v8::Local<v8::Object> wrapper = info.Holder();
74 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper); 74 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper);
75 v8SetReturnValue(info, wrapper); 75 v8SetReturnValue(info, wrapper);
76 } 76 }
77 77
78 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) 78 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
79 { 79 {
80 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 80 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
81 TestInterfaceEmpty* testInterfaceEmptyArg; 81 TestInterfaceEmpty* testInterfaceEmptyArg;
82 int longArg; 82 int longArg;
83 V8StringResource<> defaultUndefinedOptionalStringArg; 83 V8StringResource<> defaultUndefinedOptionalStringArg;
(...skipping 10 matching lines...) Expand all
94 defaultNullStringOptionalStringArg = nullptr; 94 defaultNullStringOptionalStringArg = nullptr;
95 } 95 }
96 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { 96 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) {
97 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona lDictionaryArg') is not an object."); 97 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona lDictionaryArg') is not an object.");
98 exceptionState.throwIfNeeded(); 98 exceptionState.throwIfNeeded();
99 return; 99 return;
100 } 100 }
101 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalDictionary Arg, Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState); 101 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalDictionary Arg, Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState);
102 if (UNLIKELY(info.Length() <= 5)) { 102 if (UNLIKELY(info.Length() <= 5)) {
103 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2:: create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); 103 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2:: create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg);
104 v8::Handle<v8::Object> wrapper = info.Holder(); 104 v8::Local<v8::Object> wrapper = info.Holder();
105 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr uctor2::wrapperTypeInfo, wrapper); 105 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr uctor2::wrapperTypeInfo, wrapper);
106 v8SetReturnValue(info, wrapper); 106 v8SetReturnValue(info, wrapper);
107 return; 107 return;
108 } 108 }
109 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); 109 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]);
110 } 110 }
111 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); 111 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg);
112 v8::Handle<v8::Object> wrapper = info.Holder(); 112 v8::Local<v8::Object> wrapper = info.Holder();
113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper); 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2:: wrapperTypeInfo, wrapper);
114 v8SetReturnValue(info, wrapper); 114 v8SetReturnValue(info, wrapper);
115 } 115 }
116 116
117 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 117 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
118 { 118 {
119 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate()); 119 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceConstructor2", info.Holder(), info.GetIsolate());
120 switch (std::min(6, info.Length())) { 120 switch (std::min(6, info.Length())) {
121 case 1: 121 case 1:
122 if (info[0]->IsArray()) { 122 if (info[0]->IsArray()) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 { 233 {
234 scriptWrappable->toImpl<TestInterfaceConstructor2>()->ref(); 234 scriptWrappable->toImpl<TestInterfaceConstructor2>()->ref();
235 } 235 }
236 236
237 void V8TestInterfaceConstructor2::derefObject(ScriptWrappable* scriptWrappable) 237 void V8TestInterfaceConstructor2::derefObject(ScriptWrappable* scriptWrappable)
238 { 238 {
239 scriptWrappable->toImpl<TestInterfaceConstructor2>()->deref(); 239 scriptWrappable->toImpl<TestInterfaceConstructor2>()->deref();
240 } 240 }
241 241
242 } // namespace blink 242 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698