From 1575a46e0a7c505c051cbda3916f421cba7110b0 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 25 Jul 2019 00:55:50 +0200 Subject: [PATCH] deps: backport b107214 from upstream V8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [code-serializer] Handlify in CodeSerializer::Deserialize This section potentially contains allocations and thus gc, all object references should be handlified. Bug: v8:9333 Change-Id: I5814e66e8b9b75a8bd952afecae7a3a27b42a642 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647695 Auto-Submit: Jakob Gruber Commit-Queue: Simon Zünd Reviewed-by: Simon Zünd Cr-Commit-Position: refs/heads/master@{#62012} (This required resolution of a few merge conflicts, so it’s essentially a manual backport.) Refs: https://github.com/v8/v8/commit/b10721426503b87d013ecf314ca139fa5334ebb7 Refs: https://github.com/nodejs/node/pull/28847 --- deps/v8/src/snapshot/code-serializer.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/deps/v8/src/snapshot/code-serializer.cc b/deps/v8/src/snapshot/code-serializer.cc index 4743138ae5f00f..da60ea189d7516 100644 --- a/deps/v8/src/snapshot/code-serializer.cc +++ b/deps/v8/src/snapshot/code-serializer.cc @@ -303,7 +303,7 @@ MaybeHandle CodeSerializer::Deserialize( PrintF("[Deserializing from %d bytes took %0.3f ms]\n", length, ms); } - bool log_code_creation = + const bool log_code_creation = isolate->logger()->is_listening_to_code_events() || isolate->is_profiling() || isolate->code_event_dispatcher()->IsListeningToCodeEvents(); @@ -315,27 +315,28 @@ MaybeHandle CodeSerializer::Deserialize( #endif // V8_TARGET_ARCH_ARM if (log_code_creation || FLAG_log_function_events) { - String name = ReadOnlyRoots(isolate).empty_string(); - Script script = Script::cast(result->script()); - Handle