Revision: 24603
Author:   [email protected]
Date:     Tue Oct 14 13:25:19 2014 UTC
Log:      Correctly expand literal buffer for surrogate pairs.

[email protected]
BUG=chromium:423212
LOG=Y

Review URL: https://codereview.chromium.org/652743005
https://code.google.com/p/v8/source/detail?r=24603

Modified:
 /branches/bleeding_edge/src/scanner.h

=======================================
--- /branches/bleeding_edge/src/scanner.h       Fri Oct 10 07:13:46 2014 UTC
+++ /branches/bleeding_edge/src/scanner.h       Tue Oct 14 13:25:19 2014 UTC
@@ -219,6 +219,7 @@
       *reinterpret_cast<uint16_t*>(&backing_store_[position_]) =
           unibrow::Utf16::LeadSurrogate(code_unit);
       position_ += kUC16Size;
+      if (position_ >= backing_store_.length()) ExpandBuffer();
       *reinterpret_cast<uint16_t*>(&backing_store_[position_]) =
           unibrow::Utf16::TrailSurrogate(code_unit);
       position_ += kUC16Size;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to