Chromium Code Reviews| 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 56c31fe0b266e8d2497cc35559d694c2c26ea10b..9f2cfafd71616cbacb0e287205fb69505a950283 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
| @@ -146,16 +146,24 @@ using namespace HTMLNames; |
| ComputedStyle* StyleResolver::s_styleNotYetAvailable; |
| static StylePropertySet* leftToRightDeclaration() { |
| + // |MutableStylePropertySet::m_cssomWrapper| is a |ScriptWrappable|, |
| + // which must not leak between contexts via this singleton. That |
| + // cannot happen as that field will not be instantiated for this |
| + // particular singleton. Turn off the verification check. |
| DEFINE_STATIC_LOCAL(MutableStylePropertySet, leftToRightDecl, |
|
haraken
2017/02/11 10:25:20
Ditto. If there's a way to avoid using DEFINE_STAT
|
| - (MutableStylePropertySet::create(HTMLQuirksMode))); |
| + (MutableStylePropertySet::create(HTMLQuirksMode)), |
| + CheckScriptWrappable::No); |
| if (leftToRightDecl.isEmpty()) |
| leftToRightDecl.setProperty(CSSPropertyDirection, CSSValueLtr); |
| return &leftToRightDecl; |
| } |
| static StylePropertySet* rightToLeftDeclaration() { |
| + // See |leftToRightDeclaration()| comment on why |CheckScriptWrappable::No| |
| + // is used. |
| DEFINE_STATIC_LOCAL(MutableStylePropertySet, rightToLeftDecl, |
| - (MutableStylePropertySet::create(HTMLQuirksMode))); |
| + (MutableStylePropertySet::create(HTMLQuirksMode)), |
| + CheckScriptWrappable::No); |
| if (rightToLeftDecl.isEmpty()) |
| rightToLeftDecl.setProperty(CSSPropertyDirection, CSSValueRtl); |
| return &rightToLeftDecl; |