2565511: [objects] Remove MakeExternal case for uncached internal strings

https://chromium-review.googlesource.com/c/v8/v8/+/2565511
This commit is contained in:
Shelley Vohr
2020-12-08 19:57:46 -08:00
parent 6e610c5b17
commit cf09a792f0
2 changed files with 52 additions and 0 deletions

View File

@@ -31,3 +31,4 @@ fix_allow_preventing_initializeinspector_in_env.patch
src_allow_embedders_to_provide_a_custom_pageallocator_to.patch
allow_preventing_preparestacktracecallback.patch
fix_add_safeforterminationscopes_for_sigint_interruptions.patch
remove_makeexternal_case_for_uncached_internal_strings.patch

View File

@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Tue, 8 Dec 2020 19:55:41 -0800
Subject: Remove MakeExternal case for uncached internal strings
https://chromium-review.googlesource.com/c/v8/v8/+/2565511
V8 removed a case where we can make an uncached internal string
through MakeExternal - to fix this we make the strings bigger so as to
make then internal & external & not uncached (i.e. cached).
diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js
index a6724eac300d16a36ca0e64788516adb9d6f6536..e152383b56c6f2791852d5f9fb151693c2d962a6 100644
--- a/test/parallel/test-fs-write.js
+++ b/test/parallel/test-fs-write.js
@@ -40,7 +40,7 @@ const constants = fs.constants;
common.allowGlobals(externalizeString, isOneByteString, x);
{
- const expected = 'ümlaut eins'; // Must be a unique string.
+ const expected = 'ümlaut sechzig'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(isOneByteString(expected), true);
const fd = fs.openSync(fn, 'w');
@@ -50,7 +50,7 @@ common.allowGlobals(externalizeString, isOneByteString, x);
}
{
- const expected = 'ümlaut zwei'; // Must be a unique string.
+ const expected = 'ümlaut neunzig'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(isOneByteString(expected), true);
const fd = fs.openSync(fn, 'w');
@@ -60,7 +60,7 @@ common.allowGlobals(externalizeString, isOneByteString, x);
}
{
- const expected = '中文 1'; // Must be a unique string.
+ const expected = 'Zhōngwén 1'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(isOneByteString(expected), false);
const fd = fs.openSync(fn, 'w');
@@ -70,7 +70,7 @@ common.allowGlobals(externalizeString, isOneByteString, x);
}
{
- const expected = '中文 2'; // Must be a unique string.
+ const expected = 'Zhōngwén 2'; // Must be a unique string.
externalizeString(expected);
assert.strictEqual(isOneByteString(expected), false);
const fd = fs.openSync(fn, 'w');