Commit 974f3dcf authored by yangguo@chromium.org's avatar yangguo@chromium.org

Correctly expand literal buffer for surrogate pairs.

R=jkummerow@chromium.org
BUG=chromium:423212
LOG=Y

Review URL: https://codereview.chromium.org/652743005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 327d3ae8
......@@ -219,6 +219,7 @@ class LiteralBuffer {
*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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment