| Index: src/ast/ast-value-factory.cc
|
| diff --git a/src/ast/ast-value-factory.cc b/src/ast/ast-value-factory.cc
|
| index 29a6d951d1f4fa5f1dabdbc9adc13d26d3fdaf39..152dceecde8887927ae3c453e5fe794fc321f5a6 100644
|
| --- a/src/ast/ast-value-factory.cc
|
| +++ b/src/ast/ast-value-factory.cc
|
| @@ -106,9 +106,9 @@ void AstRawString::Internalize(Isolate* isolate) {
|
| }
|
| }
|
|
|
| -
|
| -bool AstRawString::AsArrayIndex(uint32_t* index) const {
|
| - if (!string_.is_null())
|
| +bool AstRawString::AsArrayIndex(uint32_t* index,
|
| + HandleDereferenceMode deref_mode) const {
|
| + if (deref_mode == HandleDereferenceMode::kAllowed && !string_.is_null())
|
| return string_->AsArrayIndex(index);
|
| if (!is_one_byte() || literal_bytes_.length() == 0 ||
|
| literal_bytes_.length() > String::kMaxArrayIndexSize)
|
| @@ -136,11 +136,10 @@ void AstConsString::Internalize(Isolate* isolate) {
|
| .ToHandleChecked();
|
| }
|
|
|
| -
|
| -bool AstValue::IsPropertyName() const {
|
| +bool AstValue::IsPropertyName(HandleDereferenceMode deref_mode) const {
|
| if (type_ == STRING) {
|
| uint32_t index;
|
| - return !string_->AsArrayIndex(&index);
|
| + return !string_->AsArrayIndex(&index, deref_mode);
|
| }
|
| return false;
|
| }
|
| @@ -276,6 +275,7 @@ void AstValueFactory::Internalize(Isolate* isolate) {
|
| // Everything is already internalized.
|
| return;
|
| }
|
| +
|
| // Strings need to be internalized before values, because values refer to
|
| // strings.
|
| for (int i = 0; i < strings_.length(); ++i) {
|
|
|