Reviewers: Jakob,
Description:
Correctly expand literal buffer for surrogate pairs.
[email protected]
BUG=chromium:423212
Please review this at https://codereview.chromium.org/652743005/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -0 lines):
M src/scanner.h
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index
d40c6266b729b7edc5a97b1e4057de42a93a0d04..7f35e719da783767d55c96ffe04d29d8b7bb12c3
100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -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;
--
--
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.