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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2624443003: Enable ThreadRestrictionVerifier for StringImpl (Closed)
Patch Set: Get rid of vestigial debugging code Created 3 years, 11 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/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index caf5618827c3424f3f6e8939958d3761287ee1f4..d4ea352e03160eab39cd439168660ebcad34c3ef 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1493,7 +1493,15 @@ String Node::debugName() const {
const Element& thisElement = toElement(*this);
if (thisElement.hasID()) {
name.append(" id=\'");
- name.append(thisElement.getIdAttribute());
+ // Unsafe hack to avoid triggering the ThreadRestrictionVerifier on
+ // StringImpl. crbug.com/545926 should be fixed completely, and we should
+ // always avoid accessing these strings from the impl thread.
+ StringImpl* impl = thisElement.getIdAttribute().impl();
+ if (impl) {
+ name.append(impl->is8Bit()
esprehn 2017/01/11 22:34:01 Why does't the thisElement.classNames() line below
+ ? StringView(impl->characters8(), impl->length())
+ : StringView(impl->characters16(), impl->length()));
+ }
name.append('\'');
}

Powered by Google App Engine
This is Rietveld 408576698