Reviewers: William Hesse, Message: BUG=24773
Description: Verify correctness of external string only if slow asserts are enabled. Please review this at http://codereview.chromium.org/294019 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/objects.cc Index: src/objects.cc =================================================================== --- src/objects.cc (revision 3087) +++ src/objects.cc (working copy) @@ -751,7 +751,7 @@ 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<size_t>(this->length()) == resource->length()); SmartPointer<uc16> smart_chars = this->ToWideCString(); @@ -794,7 +794,7 @@ 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<size_t>(this->length()) == resource->length()); SmartPointer<char> smart_chars = this->ToCString(); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
