Commit 4d71565a authored by Predrag Rudic's avatar Predrag Rudic Committed by Commit Bot

[parser] Skipping inner funcs: Fix debug mode check for big endian

Fix failing test mjsunit/skipping-inner-functions on big endian
platforms.

Change-Id: If35c5a663a296fab6ad6011cf0a101133ec6a237
Reviewed-on: https://chromium-review.googlesource.com/1029954
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52875}
parent a7e6b0ee
......@@ -613,8 +613,13 @@ void ConsumedPreParsedScopeData::RestoreDataForVariable(Variable* var) {
// It's possible that "name" is a two-byte representation of the string
// stored in the data.
for (int i = 0; i < 2 * name->length(); i += 2) {
#if defined(V8_TARGET_LITTLE_ENDIAN)
DCHECK_EQ(scope_data_->ReadUint8(), name->raw_data()[i]);
DCHECK_EQ(0, name->raw_data()[i + 1]);
#else
DCHECK_EQ(scope_data_->ReadUint8(), name->raw_data()[i + 1]);
DCHECK_EQ(0, name->raw_data()[i]);
#endif // V8_TARGET_LITTLE_ENDIAN
}
} else {
for (int i = 0; i < name->length(); ++i) {
......
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