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

Unified Diff: third_party/WebKit/Source/wtf/HashTraits.h

Issue 2004643002: Implement BroadcastChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better tests Created 4 years, 7 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/wtf/HashTraits.h
diff --git a/third_party/WebKit/Source/wtf/HashTraits.h b/third_party/WebKit/Source/wtf/HashTraits.h
index 113ebac0035d05d07b3cd842baa0a77d1c8dcb0c..77d4ff6bc35987f584449ad72aed5c9bfcd1347a 100644
--- a/third_party/WebKit/Source/wtf/HashTraits.h
+++ b/third_party/WebKit/Source/wtf/HashTraits.h
@@ -245,6 +245,9 @@ struct PairHashTraits : GenericHashTraits<std::pair<typename FirstTraitsArg::Tra
static const bool emptyValueIsZero = FirstTraits::emptyValueIsZero && SecondTraits::emptyValueIsZero;
static EmptyValueType emptyValue() { return std::make_pair(FirstTraits::emptyValue(), SecondTraits::emptyValue()); }
+ static const bool hasIsEmptyValueFunction = FirstTraits::hasIsEmptyValueFunction || SecondTraits::hasIsEmptyValueFunction;
haraken 2016/06/02 04:23:41 Would you elaborate why you need this change? Is t
Marijn Kruisselbrink 2016/06/02 18:33:30 Yes, I'd say this is an existing bug of the std::p
haraken 2016/06/03 05:33:03 Would you make the change in a separate CL?
Marijn Kruisselbrink 2016/06/03 20:37:04 Split off into https://codereview.chromium.org/204
+ static bool isEmptyValue(const TraitType& value) { return isHashTraitsEmptyValue<FirstTraits>(value.first) && isHashTraitsEmptyValue<SecondTraits>(value.second); }
+
static const unsigned minimumTableSize = FirstTraits::minimumTableSize;
static void constructDeletedValue(TraitType& slot, bool zeroValue)

Powered by Google App Engine
This is Rietveld 408576698