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

Unified Diff: mojo/public/cpp/bindings/lib/string_traits_wtf.cc

Issue 2232083002: Fix incorrect usage of StringImpl::sizeInBytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size_teeee Created 4 years, 4 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/Source/bindings/core/v8/V8StringResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/string_traits_wtf.cc
diff --git a/mojo/public/cpp/bindings/lib/string_traits_wtf.cc b/mojo/public/cpp/bindings/lib/string_traits_wtf.cc
index 19fa907448301f65ebddca5ef98f49449f0f6877..203f6f590321b18d14b518ff331d83cb5d8c99ca 100644
--- a/mojo/public/cpp/bindings/lib/string_traits_wtf.cc
+++ b/mojo/public/cpp/bindings/lib/string_traits_wtf.cc
@@ -16,7 +16,7 @@ namespace {
struct UTF8AdaptorInfo {
explicit UTF8AdaptorInfo(const WTF::String& input) : utf8_adaptor(input) {
#if DCHECK_IS_ON()
- original_size_in_bytes = static_cast<size_t>(input.sizeInBytes());
+ original_size_in_bytes = input.charactersSizeInBytes();
#endif
}
@@ -34,8 +34,7 @@ UTF8AdaptorInfo* ToAdaptor(const WTF::String& input, void* context) {
UTF8AdaptorInfo* adaptor = static_cast<UTF8AdaptorInfo*>(context);
#if DCHECK_IS_ON()
- DCHECK_EQ(adaptor->original_size_in_bytes,
- static_cast<size_t>(input.sizeInBytes()));
+ DCHECK_EQ(adaptor->original_size_in_bytes, input.charactersSizeInBytes());
#endif
return adaptor;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8StringResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698