| 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();
|
|
|