summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-11-19 15:02:51 +0100
committerJames M Snell <jasnell@gmail.com>2017-11-21 07:37:58 -0800
commit2540e3dacfe7ae55f4b3f2c229d8486d88a0622c (patch)
treeeb389c2aa69be712f5ac3ad536c685d9d849a0b7 /deps
parent5d35a1a3389c0e93be44a7458bc35a2a3cc9fb02 (diff)
downloadandroid-node-v8-2540e3dacfe7ae55f4b3f2c229d8486d88a0622c.tar.gz
android-node-v8-2540e3dacfe7ae55f4b3f2c229d8486d88a0622c.tar.bz2
android-node-v8-2540e3dacfe7ae55f4b3f2c229d8486d88a0622c.zip
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: https://github.com/v8/v8/commit/98c40a4bae915a9762c73de3307300c61e4fd91a 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>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/include/v8-platform.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h
index b1a57c9e2c..6c3c4292c5 100644
--- a/deps/v8/include/v8-platform.h
+++ b/deps/v8/include/v8-platform.h
@@ -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.