From: antonm@chromium.org Date: Tue, 20 Oct 2009 09:10:26 +0000 (+0000) Subject: Verify correctness of external string only if slow asserts are enabled. X-Git-Tag: upstream/4.7.83~23125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99445fc2115bfba583314b2d3076b31df4fba33d;p=platform%2Fupstream%2Fv8.git Verify correctness of external string only if slow asserts are enabled. Review URL: http://codereview.chromium.org/294019 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/objects.cc b/src/objects.cc index ab1d35f..0c9f965 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -751,7 +751,7 @@ Object* String::TryFlatten() { bool String::MakeExternal(v8::String::ExternalStringResource* resource) { #ifdef DEBUG - { // NOLINT (presubmit.py gets confused about if and braces) + if (FLAG_enable_slow_asserts) { // Assert that the resource and the string are equivalent. ASSERT(static_cast(this->length()) == resource->length()); SmartPointer smart_chars = this->ToWideCString(); @@ -794,7 +794,7 @@ bool String::MakeExternal(v8::String::ExternalStringResource* resource) { bool String::MakeExternal(v8::String::ExternalAsciiStringResource* resource) { #ifdef DEBUG - { // NOLINT (presubmit.py gets confused about if and braces) + if (FLAG_enable_slow_asserts) { // Assert that the resource and the string are equivalent. ASSERT(static_cast(this->length()) == resource->length()); SmartPointer smart_chars = this->ToCString();