Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/parsing/scanner-character-streams.cc

Issue 2354683003: Fix BigE for Rework scanner-character-streams. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner-character-streams.cc
diff --git a/src/parsing/scanner-character-streams.cc b/src/parsing/scanner-character-streams.cc
index f3e7d331c4cb4525569980724bfd54b221146a6c..3d3e59060629ec948eab13e8b146e3e5d766f6fe 100644
--- a/src/parsing/scanner-character-streams.cc
+++ b/src/parsing/scanner-character-streams.cc
@@ -574,8 +574,13 @@ bool TwoByteExternalStreamingStream::ReadBlock() {
if (lonely_byte) {
DCHECK_NE(chunk_no, 0);
Chunk& previous_chunk = chunks_[chunk_no - 1];
+#ifdef V8_TARGET_BIG_ENDIAN
+ uc16 character = current.data[0] |
+ previous_chunk.data[previous_chunk.byte_length - 1] << 8;
+#else
uc16 character = previous_chunk.data[previous_chunk.byte_length - 1] |
current.data[0] << 8;
+#endif
one_char_buffer_ = character;
buffer_pos_ = position;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698