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

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

Issue 1034453002: [bindings] Remove custom binding usage from XMLHttpRequest.open() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: isEmpty => isNull Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/core/xmlhttprequest/XMLHttpRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp b/Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp
index 1a67cac2e6f6631ecb2daee10964f924842d5f62..3d97655a205c542487f6fd7eabb7a1614028e698 100644
--- a/Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -155,50 +155,4 @@ void V8XMLHttpRequest::responseAttributeGetterCustom(const v8::PropertyCallbackI
}
}
-void V8XMLHttpRequest::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- // Four cases:
- // open(method, url)
- // open(method, url, async)
- // open(method, url, async, user)
- // open(method, url, async, user, passwd)
-
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "XMLHttpRequest", info.Holder(), info.GetIsolate());
-
- if (info.Length() < 2) {
- exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
- exceptionState.throwIfNeeded();
- return;
- }
-
- XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toImpl(info.Holder());
-
- TOSTRING_VOID(V8StringResource<>, method, info[0]);
- TOSTRING_VOID(V8StringResource<>, urlstring, info[1]);
-
- ExecutionContext* context = currentExecutionContext(info.GetIsolate());
- KURL url = context->completeURL(urlstring);
-
- if (info.Length() >= 3) {
- bool async = info[2]->BooleanValue();
-
- if (info.Length() >= 4 && !info[3]->IsUndefined()) {
- TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, user, info[3]);
-
- if (info.Length() >= 5 && !info[4]->IsUndefined()) {
- TOSTRING_VOID(V8StringResource<TreatNullAsNullString>, password, info[4]);
- xmlHttpRequest->open(method, url, async, user, password, exceptionState);
- } else {
- xmlHttpRequest->open(method, url, async, user, exceptionState);
- }
- } else {
- xmlHttpRequest->open(method, url, async, exceptionState);
- }
- } else {
- xmlHttpRequest->open(method, url, exceptionState);
- }
-
- exceptionState.throwIfNeeded();
-}
-
} // namespace blink
« no previous file with comments | « no previous file | Source/core/xmlhttprequest/XMLHttpRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698