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

Unified Diff: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

Issue 54283002: Rename |args| to |info| in V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
diff --git a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 6a5448ceabec273e34545ff90bcec647aaa8c0b5..6a1ec2c54cfcd1ebac5f6996ef1a2caaf52df07b 100644
--- a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -52,7 +52,7 @@
namespace WebCore {
-void V8XMLHttpRequest::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8XMLHttpRequest::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExecutionContext* context = getExecutionContext();
@@ -64,9 +64,9 @@ void V8XMLHttpRequest::constructorCustom(const v8::FunctionCallbackInfo<v8::Valu
RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, securityOrigin);
- v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::associateObjectWithWrapper<V8XMLHttpRequest>(xmlHttpRequest.release(), &wrapperTypeInfo, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
- args.GetReturnValue().Set(wrapper);
+ v8::Handle<v8::Object> wrapper = info.Holder();
+ V8DOMWrapper::associateObjectWithWrapper<V8XMLHttpRequest>(xmlHttpRequest.release(), &wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration::Dependent);
+ info.GetReturnValue().Set(wrapper);
}
void V8XMLHttpRequest::responseTextAttributeGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
@@ -156,7 +156,7 @@ void V8XMLHttpRequest::responseAttributeGetterCustom(v8::Local<v8::String> name,
}
}
-void V8XMLHttpRequest::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8XMLHttpRequest::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
// Four cases:
// open(method, url)
@@ -164,29 +164,29 @@ void V8XMLHttpRequest::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value
// open(method, url, async, user)
// open(method, url, async, user, passwd)
- if (args.Length() < 2) {
- throwTypeError(ExceptionMessages::failedToExecute("open", "XMLHttpRequest", ExceptionMessages::notEnoughArguments(2, args.Length())), args.GetIsolate());
+ if (info.Length() < 2) {
+ throwTypeError(ExceptionMessages::failedToExecute("open", "XMLHttpRequest", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate());
return;
}
- XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, method, args[0]);
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, urlstring, args[1]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, method, info[0]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, urlstring, info[1]);
ExecutionContext* context = getExecutionContext();
KURL url = context->completeURL(urlstring);
- ExceptionState es(args.GetIsolate());
+ ExceptionState es(info.GetIsolate());
- if (args.Length() >= 3) {
- bool async = args[2]->BooleanValue();
+ if (info.Length() >= 3) {
+ bool async = info[2]->BooleanValue();
- if (args.Length() >= 4 && !args[3]->IsUndefined()) {
- String user = toWebCoreStringWithNullCheck(args[3]);
+ if (info.Length() >= 4 && !info[3]->IsUndefined()) {
+ String user = toWebCoreStringWithNullCheck(info[3]);
- if (args.Length() >= 5 && !args[4]->IsUndefined()) {
- String passwd = toWebCoreStringWithNullCheck(args[4]);
+ if (info.Length() >= 5 && !info[4]->IsUndefined()) {
+ String passwd = toWebCoreStringWithNullCheck(info[4]);
xmlHttpRequest->open(method, url, async, user, passwd, es);
} else {
xmlHttpRequest->open(method, url, async, user, es);
@@ -207,47 +207,48 @@ static bool isDocumentType(v8::Handle<v8::Value> value, v8::Isolate* isolate, Wr
return V8Document::HasInstance(value, isolate, currentWorldType) || V8HTMLDocument::HasInstance(value, isolate, currentWorldType);
}
-void V8XMLHttpRequest::sendMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+void V8XMLHttpRequest::sendMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder());
+ XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
InspectorInstrumentation::willSendXMLHttpRequest(xmlHttpRequest->executionContext(), xmlHttpRequest->url());
- ExceptionState es(args.GetIsolate());
- if (args.Length() < 1)
+ ExceptionState es(info.GetIsolate());
+ if (info.Length() < 1)
xmlHttpRequest->send(es);
else {
- v8::Handle<v8::Value> arg = args[0];
- WrapperWorldType currentWorldType = worldType(args.GetIsolate());
- if (isUndefinedOrNull(arg))
+ v8::Handle<v8::Value> arg = info[0];
+ WrapperWorldType currentWorldType = worldType(info.GetIsolate());
+ if (isUndefinedOrNull(arg)) {
xmlHttpRequest->send(es);
- else if (isDocumentType(arg, args.GetIsolate(), currentWorldType)) {
+ } else if (isDocumentType(arg, info.GetIsolate(), currentWorldType)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
Document* document = V8Document::toNative(object);
ASSERT(document);
xmlHttpRequest->send(document, es);
- } else if (V8Blob::HasInstance(arg, args.GetIsolate(), currentWorldType)) {
+ } else if (V8Blob::HasInstance(arg, info.GetIsolate(), currentWorldType)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
Blob* blob = V8Blob::toNative(object);
ASSERT(blob);
xmlHttpRequest->send(blob, es);
- } else if (V8FormData::HasInstance(arg, args.GetIsolate(), currentWorldType)) {
+ } else if (V8FormData::HasInstance(arg, info.GetIsolate(), currentWorldType)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
DOMFormData* domFormData = V8FormData::toNative(object);
ASSERT(domFormData);
xmlHttpRequest->send(domFormData, es);
- } else if (V8ArrayBuffer::HasInstance(arg, args.GetIsolate(), currentWorldType)) {
+ } else if (V8ArrayBuffer::HasInstance(arg, info.GetIsolate(), currentWorldType)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object);
ASSERT(arrayBuffer);
xmlHttpRequest->send(arrayBuffer, es);
- } else if (V8ArrayBufferView::HasInstance(arg, args.GetIsolate(), currentWorldType)) {
+ } else if (V8ArrayBufferView::HasInstance(arg, info.GetIsolate(), currentWorldType)) {
v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(object);
ASSERT(arrayBufferView);
xmlHttpRequest->send(arrayBufferView, es);
- } else
+ } else {
xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), es);
+ }
}
es.throwIfNeeded();
« no previous file with comments | « Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp ('k') | Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698