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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.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/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index 7bd797a5fb19fe4616f5ddbcd7d818ebb913b80f..1be5fad18b2b9d9ad5c2104ec45e908da5735dee 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -141,18 +141,18 @@ ComputedStyle* StyleResolver::s_styleNotYetAvailable;
static StylePropertySet* leftToRightDeclaration()
{
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(MutableStylePropertySet, leftToRightDecl, (MutableStylePropertySet::create(HTMLQuirksMode)));
- if (leftToRightDecl->isEmpty())
- leftToRightDecl->setProperty(CSSPropertyDirection, CSSValueLtr);
- return leftToRightDecl;
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, leftToRightDecl, (MutableStylePropertySet::create(HTMLQuirksMode)));
+ if (leftToRightDecl.isEmpty())
+ leftToRightDecl.setProperty(CSSPropertyDirection, CSSValueLtr);
+ return &leftToRightDecl;
}
static StylePropertySet* rightToLeftDeclaration()
{
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(MutableStylePropertySet, rightToLeftDecl, (MutableStylePropertySet::create(HTMLQuirksMode)));
- if (rightToLeftDecl->isEmpty())
- rightToLeftDecl->setProperty(CSSPropertyDirection, CSSValueRtl);
- return rightToLeftDecl;
+ DEFINE_STATIC_LOCAL(MutableStylePropertySet, rightToLeftDecl, (MutableStylePropertySet::create(HTMLQuirksMode)));
+ if (rightToLeftDecl.isEmpty())
+ rightToLeftDecl.setProperty(CSSPropertyDirection, CSSValueRtl);
+ return &rightToLeftDecl;
}
static void collectScopedResolversForHostedShadowTrees(const Element& element, HeapVector<Member<ScopedStyleResolver>, 8>& resolvers)

Powered by Google App Engine
This is Rietveld 408576698