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

Side by Side Diff: Source/bindings/tests/results/V8TestActiveDOMObject.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host); 82 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host);
83 return BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSe curityError); 83 return BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSe curityError);
84 } 84 }
85 85
86 bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8 ::AccessType type, v8::Local<v8::Value>) 86 bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8 ::AccessType type, v8::Local<v8::Value>)
87 { 87 {
88 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host); 88 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host);
89 return BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSe curityError); 89 return BindingSecurity::shouldAllowAccessToFrame(imp->frame(), DoNotReportSe curityError);
90 } 90 }
91 91
92 static void excitingFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& ar gs) 92 static void excitingFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
93 { 93 {
94 if (UNLIKELY(args.Length() < 1)) { 94 if (UNLIKELY(info.Length() < 1)) {
95 throwTypeError(ExceptionMessages::failedToExecute("excitingFunction", "T estActiveDOMObject", ExceptionMessages::notEnoughArguments(1, args.Length())), a rgs.GetIsolate()); 95 throwTypeError(ExceptionMessages::failedToExecute("excitingFunction", "T estActiveDOMObject", ExceptionMessages::notEnoughArguments(1, info.Length())), i nfo.GetIsolate());
96 return; 96 return;
97 } 97 }
98 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder()); 98 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(info.Holder());
99 ExceptionState es(args.GetIsolate()); 99 ExceptionState es(info.GetIsolate());
100 if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), es)) { 100 if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), es)) {
101 es.throwIfNeeded(); 101 es.throwIfNeeded();
102 return; 102 return;
103 } 103 }
104 V8TRYCATCH_VOID(Node*, nextChild, V8Node::HasInstance(args[0], args.GetIsola te(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::C ast(args[0])) : 0); 104 V8TRYCATCH_VOID(Node*, nextChild, V8Node::HasInstance(info[0], info.GetIsola te(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::C ast(info[0])) : 0);
105 imp->excitingFunction(nextChild); 105 imp->excitingFunction(nextChild);
106 } 106 }
107 107
108 static void excitingFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& args) 108 static void excitingFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
109 { 109 {
110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
111 TestActiveDOMObjectV8Internal::excitingFunctionMethod(args); 111 TestActiveDOMObjectV8Internal::excitingFunctionMethod(info);
112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
113 } 113 }
114 114
115 static void postMessageMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 115 static void postMessageMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
116 { 116 {
117 if (UNLIKELY(args.Length() < 1)) { 117 if (UNLIKELY(info.Length() < 1)) {
118 throwTypeError(ExceptionMessages::failedToExecute("postMessage", "TestAc tiveDOMObject", ExceptionMessages::notEnoughArguments(1, args.Length())), args.G etIsolate()); 118 throwTypeError(ExceptionMessages::failedToExecute("postMessage", "TestAc tiveDOMObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.G etIsolate());
119 return; 119 return;
120 } 120 }
121 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder()); 121 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(info.Holder());
122 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, message, args[0]); 122 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, message, info[0]);
123 imp->postMessage(message); 123 imp->postMessage(message);
124 } 124 }
125 125
126 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 126 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
127 { 127 {
128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
129 TestActiveDOMObjectV8Internal::postMessageMethod(args); 129 TestActiveDOMObjectV8Internal::postMessageMethod(info);
130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
131 } 131 }
132 132
133 static void postMessageAttributeGetter(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Value>& info) 133 static void postMessageAttributeGetter(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Value>& info)
134 { 134 {
135 // This is only for getting a unique pointer which we can pass to privateTem plate. 135 // This is only for getting a unique pointer which we can pass to privateTem plate.
136 static int privateTemplateUniqueKey; 136 static int privateTemplateUniqueKey;
137 WrapperWorldType currentWorldType = worldType(info.GetIsolate()); 137 WrapperWorldType currentWorldType = worldType(info.GetIsolate());
138 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); 138 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate());
139 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur rentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMes sageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(inf o.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentWor ldType)), 1); 139 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur rentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::postMes sageMethodCallback, v8Undefined(), v8::Signature::New(V8PerIsolateData::from(inf o.GetIsolate())->rawTemplate(&V8TestActiveDOMObject::wrapperTypeInfo, currentWor ldType)), 1);
(...skipping 22 matching lines...) Expand all
162 v8SetReturnValue(info, privateTemplate->GetFunction()); 162 v8SetReturnValue(info, privateTemplate->GetFunction());
163 } 163 }
164 164
165 static void postMessageAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 165 static void postMessageAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
166 { 166 {
167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
168 TestActiveDOMObjectV8Internal::postMessageAttributeGetter(name, info); 168 TestActiveDOMObjectV8Internal::postMessageAttributeGetter(name, info);
169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
170 } 170 }
171 171
172 static void perWorldBindingsMethodWithDoNotCheckSecurityMethod(const v8::Functio nCallbackInfo<v8::Value>& args) 172 static void perWorldBindingsMethodWithDoNotCheckSecurityMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
173 { 173 {
174 if (UNLIKELY(args.Length() < 1)) { 174 if (UNLIKELY(info.Length() < 1)) {
175 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsMetho dWithDoNotCheckSecurity", "TestActiveDOMObject", ExceptionMessages::notEnoughArg uments(1, args.Length())), args.GetIsolate()); 175 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsMetho dWithDoNotCheckSecurity", "TestActiveDOMObject", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate());
176 return; 176 return;
177 } 177 }
178 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder()); 178 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(info.Holder());
179 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, url, args[0]); 179 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, url, info[0]);
180 imp->perWorldBindingsMethodWithDoNotCheckSecurity(url); 180 imp->perWorldBindingsMethodWithDoNotCheckSecurity(url);
181 } 181 }
182 182
183 static void perWorldBindingsMethodWithDoNotCheckSecurityMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args) 183 static void perWorldBindingsMethodWithDoNotCheckSecurityMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
184 { 184 {
185 if (UNLIKELY(args.Length() < 1)) { 185 if (UNLIKELY(info.Length() < 1)) {
186 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsMetho dWithDoNotCheckSecurity", "TestActiveDOMObject", ExceptionMessages::notEnoughArg uments(1, args.Length())), args.GetIsolate()); 186 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsMetho dWithDoNotCheckSecurity", "TestActiveDOMObject", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate());
187 return; 187 return;
188 } 188 }
189 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder()); 189 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(info.Holder());
190 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, url, args[0]); 190 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, url, info[0]);
191 imp->perWorldBindingsMethodWithDoNotCheckSecurity(url); 191 imp->perWorldBindingsMethodWithDoNotCheckSecurity(url);
192 } 192 }
193 193
194 static void perWorldBindingsMethodWithDoNotCheckSecurityMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& args) 194 static void perWorldBindingsMethodWithDoNotCheckSecurityMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
195 { 195 {
196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
197 V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->Ge tCurrentContext()); 197 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
198 if (contextData && contextData->activityLogger()) { 198 if (contextData && contextData->activityLogger()) {
199 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args); 199 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(info);
200 contextData->activityLogger()->log("TestActiveDOMObject.perWorldBindings MethodWithDoNotCheckSecurity", args.Length(), loggerArgs.data(), "Method"); 200 contextData->activityLogger()->log("TestActiveDOMObject.perWorldBindings MethodWithDoNotCheckSecurity", info.Length(), loggerArgs.data(), "Method");
201 } 201 }
202 TestActiveDOMObjectV8Internal::perWorldBindingsMethodWithDoNotCheckSecurityM ethod(args); 202 TestActiveDOMObjectV8Internal::perWorldBindingsMethodWithDoNotCheckSecurityM ethod(info);
203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
204 } 204 }
205 205
206 static void perWorldBindingsMethodWithDoNotCheckSecurityMethodCallbackForMainWor ld(const v8::FunctionCallbackInfo<v8::Value>& args) 206 static void perWorldBindingsMethodWithDoNotCheckSecurityMethodCallbackForMainWor ld(const v8::FunctionCallbackInfo<v8::Value>& info)
207 { 207 {
208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
209 TestActiveDOMObjectV8Internal::perWorldBindingsMethodWithDoNotCheckSecurityM ethodForMainWorld(args); 209 TestActiveDOMObjectV8Internal::perWorldBindingsMethodWithDoNotCheckSecurityM ethodForMainWorld(info);
210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
211 } 211 }
212 212
213 static void perWorldBindingsMethodWithDoNotCheckSecurityAttributeGetter(v8::Loca l<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 213 static void perWorldBindingsMethodWithDoNotCheckSecurityAttributeGetter(v8::Loca l<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
214 { 214 {
215 // This is only for getting a unique pointer which we can pass to privateTem plate. 215 // This is only for getting a unique pointer which we can pass to privateTem plate.
216 static int privateTemplateUniqueKey; 216 static int privateTemplateUniqueKey;
217 WrapperWorldType currentWorldType = worldType(info.GetIsolate()); 217 WrapperWorldType currentWorldType = worldType(info.GetIsolate());
218 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); 218 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate());
219 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur rentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::perWorl dBindingsMethodWithDoNotCheckSecurityMethodCallback, v8Undefined(), v8::Signatur e::New(V8PerIsolateData::from(info.GetIsolate())->rawTemplate(&V8TestActiveDOMOb ject::wrapperTypeInfo, currentWorldType)), 1); 219 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur rentWorldType, &privateTemplateUniqueKey, TestActiveDOMObjectV8Internal::perWorl dBindingsMethodWithDoNotCheckSecurityMethodCallback, v8Undefined(), v8::Signatur e::New(V8PerIsolateData::from(info.GetIsolate())->rawTemplate(&V8TestActiveDOMOb ject::wrapperTypeInfo, currentWorldType)), 1);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObject>(impl, &wrapp erTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); 392 V8DOMWrapper::associateObjectWithWrapper<V8TestActiveDOMObject>(impl, &wrapp erTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
393 return wrapper; 393 return wrapper;
394 } 394 }
395 395
396 void V8TestActiveDOMObject::derefObject(void* object) 396 void V8TestActiveDOMObject::derefObject(void* object)
397 { 397 {
398 fromInternalPointer(object)->deref(); 398 fromInternalPointer(object)->deref();
399 } 399 }
400 400
401 } // namespace WebCore 401 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8SupportTestInterface.cpp ('k') | Source/bindings/tests/results/V8TestCustomAccessors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698