Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(831)

Issue 988483002: Use a joinable background thread instead of worker pool in gin (Closed)

Created:
5 years, 9 months ago by jamesr
Modified:
5 years, 9 months ago
Reviewers:
msw, abarth-chromium
CC:
abarth-chromium, Aaron Boodman, ben+mojo_chromium.org, darin (slow to review), hansmuller, mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Use a joinable background thread instead of worker pool in gin gin's V8Platform wants to provide a way to run background tasks on V8's behalf. It was using a base::WorkerPool, which lazily constructs non joinable threads to execute tasks. This is problematic when running inside a shared library that needs to stop completely so it can be unloaded. This uses a single lazily constructed thread for background tasks. In the context of js_content_handler there likely isn't another thread sitting around which could share work with this since all the app does is run JS, so pooling isn't that useful. R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/74f86ec4260f259401b594ff6129306465a5a801

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -5 lines) Patch
M gin/public/v8_platform.h View 2 chunks +6 lines, -0 lines 0 comments Download
M gin/v8_platform.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M mojo/tools/roll/update_from_chromium.py View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (2 generated)
jamesr
5 years, 9 months ago (2015-03-05 20:24:50 UTC) #2
abarth-chromium
lgtm
5 years, 9 months ago (2015-03-05 20:43:19 UTC) #4
jamesr
Committed patchset #1 (id:1) manually as 74f86ec4260f259401b594ff6129306465a5a801 (presubmit successful).
5 years, 9 months ago (2015-03-05 21:07:13 UTC) #5
msw
Neat, it didn't occur to me to avoid base::WorkerPool from V8Platform. That should solve most ...
5 years, 9 months ago (2015-03-05 21:31:52 UTC) #6
jamesr
5 years, 9 months ago (2015-03-05 21:40:23 UTC) #7
Message was sent while issue was closed.
On 2015/03/05 21:31:52, msw wrote:
> Neat, it didn't occur to me to avoid base::WorkerPool from V8Platform. That
> should solve most of the flaky crashes for <http://crbug.com/462755>, but we
> still need to resolve the general issue you filed, <http://crbug.com/464506>,
> right?

I think this will fix the particular crash in js_apptests since the js content
handler was only using base::WorkerPool for this particular thing.  We aren't
using base::WorkerPool for anything else within the mojo repository.

All mojo apps that do use this functionality (which today means the network
service, html_viewer, and possibly the media services) will need a resolution to
http://crbug.com/464506 in order to function properly.

Powered by Google App Engine
This is Rietveld 408576698