From 02171949a02fb55adfeeaec90a3fc9be1c1d2bd3 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 15 Mar 2019 22:58:54 +0100 Subject: [PATCH] deps: V8: cherry-pick 5b0510d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: Give the implementation of v8::MicrotaskQueue::New This adds the entrypoint to MicrotaskQueue, which used to miss the implementation. Bug: v8:8124 Change-Id: I114fb69d975ee75c86b19349ca76789e425ea910 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1505232 Reviewed-by: Yang Guo Commit-Queue: Taiju Tsuiki Cr-Commit-Position: refs/heads/master@{#60076} Refs: https://github.com/v8/v8/commit/5b0510db7c9f6f9f43f322d32fe33a19e3935f89 PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Refael Ackermann --- common.gypi | 2 +- deps/v8/include/v8.h | 2 +- deps/v8/src/api.cc | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 3b8328cd278d90..23fe6b6e2ffbea 100644 --- a/common.gypi +++ b/common.gypi @@ -37,7 +37,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.3', + 'v8_embedder_string': '-node.4', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index a5a88b685b85e6..e3f13827023654 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -6779,7 +6779,7 @@ class V8_EXPORT MicrotaskQueue { /** * Creates an empty MicrotaskQueue instance. */ - static std::unique_ptr New(); + static std::unique_ptr New(Isolate* isolate); virtual ~MicrotaskQueue() = default; diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 8375f13ba56d89..716db0c85d7492 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -8931,6 +8931,11 @@ void v8::Isolate::LocaleConfigurationChangeNotification() { #endif // V8_INTL_SUPPORT } +// static +std::unique_ptr MicrotaskQueue::New(Isolate* isolate) { + return i::MicrotaskQueue::New(reinterpret_cast(isolate)); +} + MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type) : MicrotasksScope( isolate,