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

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

Issue 2691513002: Fetch: Make Headers' constructor match the current spec IDL. (Closed)
Patch Set: Patch v2 Created 3 years, 10 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 c5619f07b39381fcf473d51bae4cc115c18954a9..9e9f6e2261ccb7cad34fb1e6b2279e9e34877bc7 100644
--- a/third_party/WebKit/Source/modules/fetch/Request.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Request.cpp
@@ -305,7 +305,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.headersDictionary.isUndefinedOrNull()) {
+ if (!init.headers) {
headers = r->getHeaders()->clone();
}
// "Empty |r|'s request's header list."
@@ -331,10 +331,7 @@ Request* Request::createRequestWithRequestOrString(
}
// "Fill |r|'s Headers object with |headers|. Rethrow any exceptions."
if (init.headers) {
- ASSERT(init.headersDictionary.isUndefinedOrNull());
r->getHeaders()->fillWith(init.headers.get(), exceptionState);
- } else if (!init.headersDictionary.isUndefinedOrNull()) {
- r->getHeaders()->fillWith(init.headersDictionary, exceptionState);
} else {
ASSERT(headers);
r->getHeaders()->fillWith(headers, exceptionState);

Powered by Google App Engine
This is Rietveld 408576698