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

Unified Diff: third_party/WebKit/Source/platform/exported/WebString.cpp

Issue 2655013004: Make WebString::equal take the length for const char* too (Closed)
Patch Set: null crash fix 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
« no previous file with comments | « no previous file | third_party/WebKit/public/platform/WebString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/exported/WebString.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebString.cpp b/third_party/WebKit/Source/platform/exported/WebString.cpp
index a41e1b034d51a0a4c6547da1b6ab973eac2ff7aa..4dc2a65cf0ae06e3dec895f2dd80f454cee8d35c 100644
--- a/third_party/WebKit/Source/platform/exported/WebString.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebString.cpp
@@ -155,8 +155,8 @@ bool WebString::equals(const WebString& s) const {
return equal(m_private.get(), s.m_private.get());
}
-bool WebString::equals(const char* characters) const {
- return equal(m_private.get(), reinterpret_cast<const LChar*>(characters));
+bool WebString::equals(const char* characters, size_t length) const {
+ return equal(m_private.get(), characters, length);
}
WebString::WebString(const WTF::String& s) : m_private(s.impl()) {}
« no previous file with comments | « no previous file | third_party/WebKit/public/platform/WebString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698