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

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

Issue 1455113002: Refactor RequestInit::areAnyMembersSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | 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 98b3dea0e168604466591e3dfbf3ed795b65b326..18640dc42007be3dc5c4ca2a13c7ce9db8bc36ae 100644
--- a/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
+++ b/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
@@ -25,28 +25,28 @@ namespace blink {
RequestInit::RequestInit(ExecutionContext* context, const Dictionary& options, ExceptionState& exceptionState)
: areAnyMembersSet(false)
{
- areAnyMembersSet = DictionaryHelper::get(options, "method", method) || areAnyMembersSet;
- areAnyMembersSet = DictionaryHelper::get(options, "headers", headers) || areAnyMembersSet;
+ areAnyMembersSet |= DictionaryHelper::get(options, "method", method);
+ areAnyMembersSet |= DictionaryHelper::get(options, "headers", headers);
if (!headers) {
Vector<Vector<String>> headersVector;
if (DictionaryHelper::get(options, "headers", headersVector, exceptionState)) {
headers = Headers::create(headersVector, exceptionState);
areAnyMembersSet = true;
} else {
- areAnyMembersSet = DictionaryHelper::get(options, "headers", headersDictionary) || areAnyMembersSet;
+ areAnyMembersSet |= DictionaryHelper::get(options, "headers", headersDictionary);
}
}
- areAnyMembersSet = DictionaryHelper::get(options, "mode", mode) || areAnyMembersSet;
- areAnyMembersSet = DictionaryHelper::get(options, "credentials", credentials) || areAnyMembersSet;
- areAnyMembersSet = DictionaryHelper::get(options, "redirect", redirect) || areAnyMembersSet;
+ areAnyMembersSet |= DictionaryHelper::get(options, "mode", mode);
+ areAnyMembersSet |= DictionaryHelper::get(options, "credentials", credentials);
+ areAnyMembersSet |= DictionaryHelper::get(options, "redirect", redirect);
AtomicString referrerString;
bool isReferrerStringSet = DictionaryHelper::get(options, "referrer", referrerString);
- areAnyMembersSet = areAnyMembersSet || isReferrerStringSet;
- areAnyMembersSet = DictionaryHelper::get(options, "integrity", integrity) || areAnyMembersSet;
+ areAnyMembersSet |= isReferrerStringSet;
+ areAnyMembersSet |= DictionaryHelper::get(options, "integrity", integrity);
v8::Local<v8::Value> v8Body;
bool isBodySet = DictionaryHelper::get(options, "body", v8Body);
- areAnyMembersSet = areAnyMembersSet || isBodySet;
+ areAnyMembersSet |= isBodySet;
if (areAnyMembersSet) {
// If any of init's members are present, unset request's
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698