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

Unified Diff: third_party/WebKit/Source/platform/wtf/Optional.h

Issue 2878053002: Keep materialized ArrayBuffer and ImageBitmap objects in SerializedScriptValue. (Closed)
Patch Set: slight refactor Created 3 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/platform/wtf/Optional.h
diff --git a/third_party/WebKit/Source/platform/wtf/Optional.h b/third_party/WebKit/Source/platform/wtf/Optional.h
index d1a12583aaad42ff088d549bd6b5ebac292ead59..9c869257851a33d5f4c4c993f2d943f226b2db39 100644
--- a/third_party/WebKit/Source/platform/wtf/Optional.h
+++ b/third_party/WebKit/Source/platform/wtf/Optional.h
@@ -16,8 +16,10 @@ namespace WTF {
// outside of the heap, similarly we enforce that one doesn't create garbage
// collected types nested inside an Optional.
template <typename T>
-using Optional = typename std::enable_if<!IsGarbageCollectedType<T>::value,
- base::Optional<T>>::type;
+using Optional =
+ typename std::enable_if<!IsGarbageCollectedType<T>::value ||
+ IsPersistentReferenceType<T>::value,
+ base::Optional<T>>::type;
constexpr base::nullopt_t kNullopt = base::nullopt;
constexpr base::in_place_t in_place = base::in_place;

Powered by Google App Engine
This is Rietveld 408576698