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

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

Issue 2840193002: fetch: Align RequestInit's |headers| with the spec. (Closed)
Patch Set: Use using, not typedef 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 2bab113355c17f0416d495163afc0227885f74f5..aa789fd48580d334294a472e3b1e3493183a1c59 100644
--- a/third_party/WebKit/Source/modules/fetch/Request.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Request.cpp
@@ -320,7 +320,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) {
+ if (init.headers.isNull()) {
headers = r->getHeaders()->Clone();
}
// "Empty |r|'s request's header list."
@@ -345,8 +345,8 @@ Request* Request::CreateRequestWithRequestOrString(
r->getHeaders()->SetGuard(Headers::kRequestNoCORSGuard);
}
// "Fill |r|'s Headers object with |headers|. Rethrow any exceptions."
- if (init.headers) {
- r->getHeaders()->FillWith(init.headers.Get(), exception_state);
+ if (!init.headers.isNull()) {
+ r->getHeaders()->FillWith(init.headers, exception_state);
} else {
DCHECK(headers);
r->getHeaders()->FillWith(headers, exception_state);
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Headers.cpp ('k') | third_party/WebKit/Source/modules/fetch/RequestInit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698