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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error Created 3 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/bindings/core/v8/V8StringResource.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp
index 340fecfc1d6d2fdc594fe97624a9873d4a30d518..ee2cc84c19830743a896d72bc515be35ad2561b1 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.cpp
@@ -76,7 +76,7 @@ struct V8StringOneByteTrait {
template <typename V8StringTrait>
String StringTraits<String>::FromV8String(v8::Local<v8::String> v8_string,
int length) {
- ASSERT(v8_string->Length() == length);
+ DCHECK_EQ(v8_string->Length(), length);
typename V8StringTrait::CharType* buffer;
String result = String::CreateUninitialized(length, buffer);
V8StringTrait::Write(v8_string, buffer, length);
@@ -87,7 +87,7 @@ template <typename V8StringTrait>
AtomicString StringTraits<AtomicString>::FromV8String(
v8::Local<v8::String> v8_string,
int length) {
- ASSERT(v8_string->Length() == length);
+ DCHECK_EQ(v8_string->Length(), length);
static const int kInlineBufferSize =
32 / sizeof(typename V8StringTrait::CharType);
if (length <= kInlineBufferSize) {
@@ -159,7 +159,7 @@ template AtomicString V8StringToWebCoreString<AtomicString>(
String Int32ToWebCoreStringFast(int value) {
// Caching of small strings below is not thread safe: newly constructed
// AtomicString are not safely published.
- ASSERT(IsMainThread());
+ DCHECK(IsMainThread());
// Most numbers used are <= 100. Even if they aren't used there's very little
// cost in using the space.

Powered by Google App Engine
This is Rietveld 408576698