Revision: 3090
Author: [email protected]
Date: Tue Oct 20 02:10:26 2009
Log: Verify correctness of external string only if slow asserts are enabled.

Review URL: http://codereview.chromium.org/294019
http://code.google.com/p/v8/source/detail?r=3090

Modified:
  /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/objects.cc      Thu Oct 15 04:52:53 2009
+++ /branches/bleeding_edge/src/objects.cc      Tue Oct 20 02:10:26 2009
@@ -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
-~----------~----~----~----~------~----~------~--~---

Reply via email to