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

Unified Diff: third_party/WebKit/Source/core/style/DataPersistent.h

Issue 2935893002: Change DataPersistent constructor to allow one line initialisation. (Closed)
Patch Set: Created 3 years, 6 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/core/style/ComputedStyle.cpp ('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/core/style/DataPersistent.h
diff --git a/third_party/WebKit/Source/core/style/DataPersistent.h b/third_party/WebKit/Source/core/style/DataPersistent.h
index 3672b6a7909f96fbd37a49502e3ef5634a75188b..ba18789be6a04f8e81c69e41885bbf242d622922 100644
--- a/third_party/WebKit/Source/core/style/DataPersistent.h
+++ b/third_party/WebKit/Source/core/style/DataPersistent.h
@@ -29,7 +29,11 @@ class DataPersistent {
USING_FAST_MALLOC(DataPersistent);
public:
- DataPersistent() : own_copy_(false) {}
+ DataPersistent()
+ : data_(WTF::WrapUnique(new Persistent<T>(T::Create()))),
+ own_copy_(true) {}
+
+ DataPersistent(std::nullptr_t) : data_(nullptr), own_copy_(false) {}
DataPersistent(const DataPersistent& other) : own_copy_(false) {
if (other.data_)
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698