ee247818e6
https://crrev.com/c/3571817 introduced a bug that string table lookups failed on SlicedStrings with a start offset of 0. This CL fixes the issue by re-using the already computed hash only if the length of the source string matches the length of the string to lookup. Bug: chromium:1320179, chromium:1321573 Change-Id: Ic8755a0266a9ec67fe5eb9c96fdab1b55d5009f2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616723 Auto-Submit: Patrick Thier <pthier@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#80309}
9 lines
330 B
JavaScript
9 lines
330 B
JavaScript
// Copyright 2022 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
let obj = { 'abcdefghijklmnopqrst': 'asdf' };
|
|
let consstring_key = 'abcdefghijklmnopqrstuvwxyz'.substring(0,20);
|
|
|
|
assertTrue(obj.hasOwnProperty(consstring_key));
|