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/core/dom/ContextFeatures.cpp

Issue 1850413002: Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address compilation failure Created 4 years, 8 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/core/dom/ContextFeatures.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContextFeatures.cpp b/third_party/WebKit/Source/core/dom/ContextFeatures.cpp
index 42b1bc2a3fe5be56d8a6b709dafe269525429fa0..69ef1352ab0c30a50938613777c1ab89e2ceb958 100644
--- a/third_party/WebKit/Source/core/dom/ContextFeatures.cpp
+++ b/third_party/WebKit/Source/core/dom/ContextFeatures.cpp
@@ -29,6 +29,7 @@
#include "core/dom/Document.h"
#include "core/page/Page.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "wtf/StdLibExtras.h"
namespace blink {
@@ -42,9 +43,9 @@ const char* ContextFeatures::supplementName()
return "ContextFeatures";
}
-ContextFeatures* ContextFeatures::defaultSwitch()
+ContextFeatures& ContextFeatures::defaultSwitch()
{
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(ContextFeatures, instance, (ContextFeatures::create(ContextFeaturesClient::empty())));
+ DEFINE_STATIC_LOCAL(ContextFeatures, instance, (ContextFeatures::create(ContextFeaturesClient::empty())));
return instance;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContextFeatures.h ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698