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

Unified Diff: third_party/WebKit/Source/wtf/text/StringView.cpp

Issue 2597273002: Allow StringView to have the sole reference to a static string (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/StringView.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringView.cpp b/third_party/WebKit/Source/wtf/text/StringView.cpp
index d3d53e6279cf68be57080973d126fc6bcdf6a07c..6774c5f7c0930a6dbe5e9e9c264de6e048eb0aa1 100644
--- a/third_party/WebKit/Source/wtf/text/StringView.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringView.cpp
@@ -16,8 +16,9 @@ StringView::StringView(const UChar* chars)
#if DCHECK_IS_ON()
StringView::~StringView() {
DCHECK(m_impl);
- DCHECK(!m_impl->hasOneRef()) << "StringView does not own the StringImpl, it "
- "must not have the last ref.";
+ DCHECK(!m_impl->hasOneRef() || m_impl->isStatic())
+ << "StringView does not own the StringImpl, it "
+ "must not have the last ref.";
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698