a8dc60b429
If a thin string can be dereferenced for StringConcat we still need to check whether the dereferenced string is a sequential string itself (it could be an external string). BUG=v8:6243 Change-Id: I146541512525726f092580512c0b5f02d33685a7 Reviewed-on: https://chromium-review.googlesource.com/558994 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#46459}
20 lines
595 B
JavaScript
20 lines
595 B
JavaScript
// Copyright 2017 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.
|
|
|
|
// Flags: --allow-natives-syntax --expose-externalize-string
|
|
|
|
// Calculate string so that it isn't internalized.
|
|
var string = ((a,b) => { return a + b; })('foo', 'bar');
|
|
|
|
// Now externalize it.
|
|
externalizeString(string, false);
|
|
|
|
// Then internalize it by using it as a keyed property name
|
|
// to turn it a thin string.
|
|
var obj = {};
|
|
obj[string];
|
|
|
|
// Perform a string concatination.
|
|
assertEquals('"' + string + '"', '"foobar"');
|