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

Unified Diff: third_party/WebKit/Source/modules/fetch/Request.cpp

Issue 2691513002: Fetch: Make Headers' constructor match the current spec IDL. (Closed)
Patch Set: Rebase again Created 3 years, 8 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: third_party/WebKit/Source/modules/fetch/Request.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Request.cpp b/third_party/WebKit/Source/modules/fetch/Request.cpp
index 46eea38c21112f0118111705f015f9d7e066487e..6751f3276f1391932e43d03e9e2e8ac8b87e3027 100644
--- a/third_party/WebKit/Source/modules/fetch/Request.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Request.cpp
@@ -309,7 +309,7 @@ Request* Request::CreateRequestWithRequestOrString(
// We don't create a copy of r's Headers object when init's headers member
// is present.
Headers* headers = nullptr;
- if (!init.headers && init.headers_dictionary.IsUndefinedOrNull()) {
+ if (!init.headers) {
headers = r->getHeaders()->Clone();
}
// "Empty |r|'s request's header list."
@@ -335,10 +335,7 @@ Request* Request::CreateRequestWithRequestOrString(
}
// "Fill |r|'s Headers object with |headers|. Rethrow any exceptions."
if (init.headers) {
- ASSERT(init.headers_dictionary.IsUndefinedOrNull());
r->getHeaders()->FillWith(init.headers.Get(), exception_state);
- } else if (!init.headers_dictionary.IsUndefinedOrNull()) {
- r->getHeaders()->FillWith(init.headers_dictionary, exception_state);
} else {
ASSERT(headers);
r->getHeaders()->FillWith(headers, exception_state);
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Headers.idl ('k') | third_party/WebKit/Source/modules/fetch/RequestInit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698