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

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

Issue 2772013002: Fetch API: Fix behavior when Request constructor is passed an undefined referrer (Closed)
Patch Set: update expectation + rebase Created 3 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 | « third_party/WebKit/Source/bindings/core/v8/Dictionary.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/fetch/RequestInit.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/RequestInit.cpp b/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
index 54a76a215bdb1497bd74102830eef4e701a0dc90..b714c596c7fc652490cc756c2b964539f6a234cd 100644
--- a/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
+++ b/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
@@ -25,6 +25,8 @@
namespace blink {
+// TODO(yiyix): Verify if any DictionaryHelper::get should be replaced with
+// DictionaryHelper::getWithUndefinedCheck.
RequestInit::RequestInit(ExecutionContext* context,
const Dictionary& options,
ExceptionState& exceptionState)
@@ -45,8 +47,8 @@ RequestInit::RequestInit(ExecutionContext* context,
areAnyMembersSet |= DictionaryHelper::get(options, "mode", mode);
areAnyMembersSet |= DictionaryHelper::get(options, "redirect", redirect);
AtomicString referrerString;
- bool isReferrerStringSet =
- DictionaryHelper::get(options, "referrer", referrerString);
+ bool isReferrerStringSet = DictionaryHelper::getWithUndefinedCheck(
+ options, "referrer", referrerString);
areAnyMembersSet |= isReferrerStringSet;
areAnyMembersSet |= DictionaryHelper::get(options, "integrity", integrity);
AtomicString referrerPolicyString;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/Dictionary.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698