mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
deps: cherry-pick 98c40a4bae915 from V8 upstream
Original commit message:
[platform] Return task runners as shared_ptr
At the moment, task runners are returned as unique_ptr. This is
inconvenient, however. In all implementations I did, the platform holds
a shared pointer of the task runner and wraps it in a wrapper class just
to return it as a unique_ptr. With this CL the platform API is changed
to return a shared_ptr directly.
R=rmcilroy@chromium.org
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ide278db855199ea239ad0ae14d97fd17349dac8c
Reviewed-on: https://chromium-review.googlesource.com/768867
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49366}
Refs: 98c40a4bae
PR-URL: https://github.com/nodejs/node/pull/17134
Fixes: https://github.com/nodejs/node-v8/issues/24
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
99ac5cdf90
commit
3d43bce045
@ -27,7 +27,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.2',
|
||||
'v8_embedder_string': '-node.3',
|
||||
|
||||
# Enable disassembler for `--print-code` v8 options
|
||||
'v8_enable_disassembler': 1,
|
||||
|
4
deps/v8/include/v8-platform.h
vendored
4
deps/v8/include/v8-platform.h
vendored
@ -199,7 +199,7 @@ class Platform {
|
||||
* Returns a TaskRunner which can be used to post a task on the foreground.
|
||||
* This function should only be called from a foreground thread.
|
||||
*/
|
||||
virtual std::unique_ptr<v8::TaskRunner> GetForegroundTaskRunner(
|
||||
virtual std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
|
||||
Isolate* isolate) {
|
||||
// TODO(ahaas): Make this function abstract after it got implemented on all
|
||||
// platforms.
|
||||
@ -210,7 +210,7 @@ class Platform {
|
||||
* Returns a TaskRunner which can be used to post a task on a background.
|
||||
* This function should only be called from a foreground thread.
|
||||
*/
|
||||
virtual std::unique_ptr<v8::TaskRunner> GetBackgroundTaskRunner(
|
||||
virtual std::shared_ptr<v8::TaskRunner> GetBackgroundTaskRunner(
|
||||
Isolate* isolate) {
|
||||
// TODO(ahaas): Make this function abstract after it got implemented on all
|
||||
// platforms.
|
||||
|
Loading…
Reference in New Issue
Block a user