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

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

Issue 54283002: Rename |args| to |info| in V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const WrapperTypeInfo V8TestNamedConstructor::wrapperTypeInfo = { V8TestNamedCon structor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedConstruct or::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextEnabledPro totypeProperties, 0, WrapperTypeObjectPrototype }; 60 const WrapperTypeInfo V8TestNamedConstructor::wrapperTypeInfo = { V8TestNamedCon structor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedConstruct or::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextEnabledPro totypeProperties, 0, WrapperTypeObjectPrototype };
61 61
62 namespace TestNamedConstructorV8Internal { 62 namespace TestNamedConstructorV8Internal {
63 63
64 template <typename T> void V8_USE(T) { } 64 template <typename T> void V8_USE(T) { }
65 65
66 } // namespace TestNamedConstructorV8Internal 66 } // namespace TestNamedConstructorV8Internal
67 67
68 const WrapperTypeInfo V8TestNamedConstructorConstructor::wrapperTypeInfo = { V8T estNamedConstructorConstructor::GetTemplate, V8TestNamedConstructor::derefObject , V8TestNamedConstructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::insta llPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype }; 68 const WrapperTypeInfo V8TestNamedConstructorConstructor::wrapperTypeInfo = { V8T estNamedConstructorConstructor::GetTemplate, V8TestNamedConstructor::derefObject , V8TestNamedConstructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::insta llPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype };
69 69
70 static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback Info<v8::Value>& args) 70 static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback Info<v8::Value>& info)
71 { 71 {
72 if (!args.IsConstructCall()) { 72 if (!info.IsConstructCall()) {
73 throwTypeError(ExceptionMessages::failedToConstruct("Audio", "Please use the 'new' operator, this DOM object constructor cannot be called as a function. "), args.GetIsolate()); 73 throwTypeError(ExceptionMessages::failedToConstruct("Audio", "Please use the 'new' operator, this DOM object constructor cannot be called as a function. "), info.GetIsolate());
74 return; 74 return;
75 } 75 }
76 76
77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
78 args.GetReturnValue().Set(args.Holder()); 78 info.GetReturnValue().Set(info.Holder());
79 return; 79 return;
80 } 80 }
81 81
82 Document* document = currentDocument(); 82 Document* document = currentDocument();
83 ASSERT(document); 83 ASSERT(document);
84 84
85 // Make sure the document is added to the DOM Node map. Otherwise, the TestN amedConstructor instance 85 // Make sure the document is added to the DOM Node map. Otherwise, the TestN amedConstructor instance
86 // may end up being the only node in the map and get garbage-collected prema turely. 86 // may end up being the only node in the map and get garbage-collected prema turely.
87 toV8(document, args.Holder(), args.GetIsolate()); 87 toV8(document, info.Holder(), info.GetIsolate());
88 88
89 if (UNLIKELY(args.Length() < 1)) { 89 if (UNLIKELY(info.Length() < 1)) {
90 throwTypeError(ExceptionMessages::failedToExecute("NamedConstructor", "T estNamedConstructor", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 90 throwTypeError(ExceptionMessages::failedToExecute("NamedConstructor", "T estNamedConstructor", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
91 return; 91 return;
92 } 92 }
93 ExceptionState es(args.GetIsolate()); 93 ExceptionState es(info.GetIsolate());
94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]);
95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); 95 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]);
96 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNul l(args, 2)); 96 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNul l(info, 2));
97 97
98 RefPtr<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstru ctor(*document, str1, str2, str3, es); 98 RefPtr<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstru ctor(*document, str1, str2, str3, es);
99 v8::Handle<v8::Object> wrapper = args.Holder(); 99 v8::Handle<v8::Object> wrapper = info.Holder();
100 if (es.throwIfNeeded()) 100 if (es.throwIfNeeded())
101 return; 101 return;
102 102
103 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl.releas e(), &V8TestNamedConstructorConstructor::wrapperTypeInfo, wrapper, args.GetIsola te(), WrapperConfiguration::Dependent); 103 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl.releas e(), &V8TestNamedConstructorConstructor::wrapperTypeInfo, wrapper, info.GetIsola te(), WrapperConfiguration::Dependent);
104 args.GetReturnValue().Set(wrapper); 104 info.GetReturnValue().Set(wrapper);
105 } 105 }
106 106
107 v8::Handle<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate( v8::Isolate* isolate, WrapperWorldType currentWorldType) 107 v8::Handle<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate( v8::Isolate* isolate, WrapperWorldType currentWorldType)
108 { 108 {
109 // This is only for getting a unique pointer which we can pass to privateTem plate. 109 // This is only for getting a unique pointer which we can pass to privateTem plate.
110 static int privateTemplateUniqueKey; 110 static int privateTemplateUniqueKey;
111 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 111 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
112 v8::Handle<v8::FunctionTemplate> result = data->privateTemplateIfExists(curr entWorldType, &privateTemplateUniqueKey); 112 v8::Handle<v8::FunctionTemplate> result = data->privateTemplateIfExists(curr entWorldType, &privateTemplateUniqueKey);
113 if (!result.IsEmpty()) 113 if (!result.IsEmpty())
114 return result; 114 return result;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &wrap perTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); 193 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &wrap perTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
194 return wrapper; 194 return wrapper;
195 } 195 }
196 196
197 void V8TestNamedConstructor::derefObject(void* object) 197 void V8TestNamedConstructor::derefObject(void* object)
198 { 198 {
199 fromInternalPointer(object)->deref(); 199 fromInternalPointer(object)->deref();
200 } 200 }
201 201
202 } // namespace WebCore 202 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestMediaQueryListListener.cpp ('k') | Source/bindings/tests/results/V8TestNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698