Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0411572

Browse filesBrowse files
addaleaxMylesBorins
authored andcommitted
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: v8/v8@98c40a4 PR-URL: #17134 Fixes: nodejs/node-v8#24 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 7812c93 commit 0411572
Copy full SHA for 0411572

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎deps/v8/include/v8-platform.h‎

Copy file name to clipboardExpand all lines: deps/v8/include/v8-platform.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class Platform {
199199
* Returns a TaskRunner which can be used to post a task on the foreground.
200200
* This function should only be called from a foreground thread.
201201
*/
202-
virtual std::unique_ptr<v8::TaskRunner> GetForegroundTaskRunner(
202+
virtual std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
203203
Isolate* isolate) {
204204
// TODO(ahaas): Make this function abstract after it got implemented on all
205205
// platforms.
@@ -210,7 +210,7 @@ class Platform {
210210
* Returns a TaskRunner which can be used to post a task on a background.
211211
* This function should only be called from a foreground thread.
212212
*/
213-
virtual std::unique_ptr<v8::TaskRunner> GetBackgroundTaskRunner(
213+
virtual std::shared_ptr<v8::TaskRunner> GetBackgroundTaskRunner(
214214
Isolate* isolate) {
215215
// TODO(ahaas): Make this function abstract after it got implemented on all
216216
// platforms.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.