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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTableElement.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/html/HTMLTableElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
index 95f52894748efc04d710cea6029c776ed17f8f25..693c394111e1b5524280dcfb8bf3b12a24a7a4c5 100644
--- a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
@@ -410,18 +410,18 @@ const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle()
// Setting the border to 'hidden' allows it to win over any border
// set on the table's cells during border-conflict resolution.
if (m_rulesAttr != UnsetRules) {
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueHidden)));
- return solidBorderStyle;
+ DEFINE_STATIC_LOCAL(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueHidden)));
+ return &solidBorderStyle;
}
return nullptr;
}
if (m_borderColorAttr) {
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueSolid)));
- return solidBorderStyle;
+ DEFINE_STATIC_LOCAL(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueSolid)));
+ return &solidBorderStyle;
}
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, outsetBorderStyle, (createBorderStyle(CSSValueOutset)));
- return outsetBorderStyle;
+ DEFINE_STATIC_LOCAL(StylePropertySet, outsetBorderStyle, (createBorderStyle(CSSValueOutset)));
+ return &outsetBorderStyle;
}
HTMLTableElement::CellBorders HTMLTableElement::getCellBorders() const
@@ -517,11 +517,11 @@ const StylePropertySet* HTMLTableElement::additionalGroupStyle(bool rows)
return nullptr;
if (rows) {
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, rowBorderStyle, (createGroupBorderStyle(true)));
- return rowBorderStyle;
+ DEFINE_STATIC_LOCAL(StylePropertySet, rowBorderStyle, (createGroupBorderStyle(true)));
+ return &rowBorderStyle;
}
- DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, columnBorderStyle, (createGroupBorderStyle(false)));
- return columnBorderStyle;
+ DEFINE_STATIC_LOCAL(StylePropertySet, columnBorderStyle, (createGroupBorderStyle(false)));
+ return &columnBorderStyle;
}
bool HTMLTableElement::isURLAttribute(const Attribute& attribute) const
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLStyleElement.cpp ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698