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

Issue 2556983003: NaCl plugin: Make ServiceRuntime::Shutdown() kill the NaCl loader (Closed)

Created:
4 years ago by Derek Schuff
Modified:
4 years ago
Reviewers:
bbudge
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

NaCl plugin: Make ServiceRuntime::Shutdown() kill the NaCl loader Previously, Shutdown would kill the loader by closing the SRPC command channel. After SRPC removal, it became a no-op. But this caused a deadlock in some cases where surfaway or embed element removal would cause the PNaCl translator to block waiting to join the translation thread while the translator nexe was waiting for more data. This change makes the original shutdown sequence work as intended by making ServiceRuntime::Shutdown() close the trusted plugin IPC channel, which causes the service runtime to immediately exit. 1. This pokes a sort of arbitrary hole in the PPBNaClPrivate interface but that interface is vestigial anyway. 2. Even aside from PPBNaClPrvate, there is a lot that could be simplified or refactored about shutdown post-SRPC, but this is a minimal change to fix the deadlock that users are experiencing, so we can get it on a branch. R=bbudge BUG=645688 Committed: https://crrev.com/61ef841a46679445e532906eba407e4ba7ecda8e Cr-Commit-Position: refs/heads/master@{#437418}

Patch Set 1 #

Patch Set 2 : Fix include rules #

Patch Set 3 : Make direct PPBNaClPrivate interface rather than leaking class through it #

Patch Set 4 : Make direct PPBNaClPrivate interface rather than leaking class through it #

Patch Set 5 #

Total comments: 9

Patch Set 6 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -3 lines) Patch
M components/nacl/renderer/nexe_load_manager.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M components/nacl/renderer/nexe_load_manager.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M components/nacl/renderer/plugin/pnacl_translate_thread.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M components/nacl/renderer/plugin/service_runtime.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/nacl/renderer/plugin/service_runtime.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/nacl/renderer/ppb_nacl_private.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (19 generated)
Derek Schuff
4 years ago (2016-12-07 23:35:04 UTC) #7
bbudge
Looking good, just a few comments. https://codereview.chromium.org/2556983003/diff/80001/components/nacl/renderer/nexe_load_manager.h File components/nacl/renderer/nexe_load_manager.h (right): https://codereview.chromium.org/2556983003/diff/80001/components/nacl/renderer/nexe_load_manager.h#newcode71 components/nacl/renderer/nexe_load_manager.h:71: void close_trusted_plugin_channel(); nit: ...
4 years ago (2016-12-08 23:20:00 UTC) #14
Derek Schuff
https://codereview.chromium.org/2556983003/diff/80001/components/nacl/renderer/nexe_load_manager.h File components/nacl/renderer/nexe_load_manager.h (right): https://codereview.chromium.org/2556983003/diff/80001/components/nacl/renderer/nexe_load_manager.h#newcode71 components/nacl/renderer/nexe_load_manager.h:71: void close_trusted_plugin_channel(); On 2016/12/08 23:20:00, bbudge wrote: > nit: ...
4 years ago (2016-12-09 00:11:34 UTC) #16
bbudge
lgtm Thanks for fixing this! https://codereview.chromium.org/2556983003/diff/80001/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/2556983003/diff/80001/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode889 components/nacl/renderer/ppb_nacl_private_impl.cc:889: auto* load_mgr = GetNexeLoadManager(instance); ...
4 years ago (2016-12-09 00:19:44 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2556983003/100001
4 years ago (2016-12-09 00:24:42 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-09 01:42:10 UTC) #24
commit-bot: I haz the power
4 years ago (2016-12-09 01:45:44 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/61ef841a46679445e532906eba407e4ba7ecda8e
Cr-Commit-Position: refs/heads/master@{#437418}

Powered by Google App Engine
This is Rietveld 408576698