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

Issue 2033013003: Use shared memory for moving data over BlobChannel Mojo interface. (Closed)

Created:
4 years, 6 months ago by Kevin M
Modified:
4 years, 5 months ago
CC:
Aaron Boodman, abarth-chromium, anandc+watch-blimp_chromium.org, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), dtrainor+watch-blimp_chromium.org, jam, jessicag+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, qsr+mojo_chromium.org, shaktisahu+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@blobchannel-master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use shared memory for moving data over BlobChannel Mojo interface. * Change BlobChannel PutBlob() Mojo IDL to use shared memory handles instead of a byte array. * Create "SharedMemoryBlob" class for encapsulating Mojo shared memory initialization and lifetime management semantics. * Add BlobChannelSenderProxy class, which manages interactions with the renderer side of the BlobChannel IPC interface. * Add Blimp-specific run_all_unittests.cc, which bootstraps the Mojo environment before executing unittests. R=wez@chromium.org CC=maniscalco@chromium.org BUG=600719, 614564 Committed: https://crrev.com/ca6057dcb4c724085356bda1706b48cf54e08fba Cr-Commit-Position: refs/heads/master@{#406045}

Patch Set 1 #

Total comments: 18

Patch Set 2 : maniscalco feedback #

Patch Set 3 : . #

Total comments: 2

Patch Set 4 : added tests #

Total comments: 2

Patch Set 5 : jam feedback #

Total comments: 2

Patch Set 6 : Added new test runner with Mojo initialization #

Total comments: 46

Patch Set 7 : . #

Patch Set 8 : Use Mojo's unmapping capabilities #

Patch Set 9 : make da comment more better #

Patch Set 10 : resolve indirect GN dependencies #

Patch Set 11 : Switch to new Mojo shared buffer API #

Total comments: 14

Patch Set 12 : dcheng feedback #

Total comments: 4

Patch Set 13 : dcheng feedback #

Total comments: 24

Patch Set 14 : IPC owners file added. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -19 lines) Patch
M blimp/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M blimp/client/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +0 lines, -3 lines 0 comments Download
M blimp/engine/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +8 lines, -3 lines 0 comments Download
A + blimp/engine/mojo/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 0 chunks +-1 lines, --1 lines 0 comments Download
M blimp/engine/mojo/blob_channel.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -3 lines 0 comments Download
M blimp/engine/mojo/blob_channel_service.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M blimp/engine/mojo/blob_channel_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +22 lines, -2 lines 0 comments Download
M blimp/engine/renderer/blob_channel_sender_proxy.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M blimp/engine/renderer/blob_channel_sender_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +62 lines, -4 lines 0 comments Download
A blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +84 lines, -0 lines 0 comments Download
M blimp/net/BUILD.gn View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
M blimp/net/blob_channel/blob_channel_sender.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
A blimp/net/blob_channel/mock_blob_channel_sender.h View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A + blimp/net/blob_channel/mock_blob_channel_sender.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M blimp/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
M blimp/test/DEPS View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A + blimp/test/run_all_unittests.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (17 generated)
Kevin M
4 years, 6 months ago (2016-06-02 20:57:24 UTC) #1
Kevin M
Will add unit tests for the proxy in a followup patch.
4 years, 6 months ago (2016-06-02 21:18:13 UTC) #2
maniscalco
Neat, that's pretty simple change. I've got some drive-by comments/questions. Also, in the commit description ...
4 years, 6 months ago (2016-06-03 16:43:53 UTC) #4
Kevin M
https://codereview.chromium.org/2033013003/diff/1/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/1/blimp/engine/mojo/blob_channel.mojom#newcode10 blimp/engine/mojo/blob_channel.mojom:10: PutBlob(string id, handle<shared_buffer> data, uint32 size) => (); On ...
4 years, 6 months ago (2016-06-03 17:14:57 UTC) #6
maniscalco
https://codereview.chromium.org/2033013003/diff/1/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/1/blimp/engine/mojo/blob_channel.mojom#newcode10 blimp/engine/mojo/blob_channel.mojom:10: PutBlob(string id, handle<shared_buffer> data, uint32 size) => (); On ...
4 years, 6 months ago (2016-06-06 15:43:57 UTC) #7
Kevin M
+jam for new content/app/mojo (mojo_init.h) DEPS. Sorry for the delay in getting these tests out. ...
4 years, 6 months ago (2016-06-09 00:08:32 UTC) #9
jam
https://codereview.chromium.org/2033013003/diff/60001/blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc File blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc (right): https://codereview.chromium.org/2033013003/diff/60001/blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc#newcode15 blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc:15: #include "content/app/mojo/mojo_init.h" code outside of content/ can only include ...
4 years, 6 months ago (2016-06-09 15:55:04 UTC) #10
Kevin M
Thanks sky@! No need for content/ DEPS approval anymore. (hits eject button) rockot@, can you ...
4 years, 6 months ago (2016-06-09 17:51:19 UTC) #12
Ken Rockot(use gerrit already)
DEPS is fine but I'm pretty sure this is broken (see inline comment) https://codereview.chromium.org/2033013003/diff/80001/blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc File ...
4 years, 6 months ago (2016-06-09 17:55:40 UTC) #13
Kevin M
https://codereview.chromium.org/2033013003/diff/80001/blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc File blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc (right): https://codereview.chromium.org/2033013003/diff/80001/blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc#newcode35 blimp/engine/renderer/blob_channel_sender_proxy_unittest.cc:35: mojo::edk::Init(); On 2016/06/09 17:55:40, Ken Rockot wrote: > This ...
4 years, 6 months ago (2016-06-09 19:59:43 UTC) #14
Wez
Haven't reviewed the unit-tests yet; will follow-up w/ that. https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom#newcode9 blimp/engine/mojo/blob_channel.mojom:9: ...
4 years, 6 months ago (2016-06-11 00:16:38 UTC) #15
maniscalco
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel_service.cc#newcode32 blimp/engine/mojo/blob_channel_service.cc:32: LOG(ERROR) << "Couldn't map buffer for blob ID: " ...
4 years, 6 months ago (2016-06-13 15:23:08 UTC) #16
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/2033013003/diff/100001/blimp/test/run_all_unittests.cc File blimp/test/run_all_unittests.cc (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/test/run_all_unittests.cc#newcode16 blimp/test/run_all_unittests.cc:16: nitty nit: redundant vspace
4 years, 6 months ago (2016-06-13 17:36:43 UTC) #17
Wez
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel_service.cc#newcode32 blimp/engine/mojo/blob_channel_service.cc:32: LOG(ERROR) << "Couldn't map buffer for blob ID: " ...
4 years, 6 months ago (2016-06-13 23:37:50 UTC) #18
maniscalco
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel_service.cc#newcode32 blimp/engine/mojo/blob_channel_service.cc:32: LOG(ERROR) << "Couldn't map buffer for blob ID: " ...
4 years, 6 months ago (2016-06-16 15:31:34 UTC) #19
Kevin M
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom#newcode9 blimp/engine/mojo/blob_channel.mojom:9: // large data payloads out of the Mojo IPC ...
4 years, 6 months ago (2016-06-16 21:00:39 UTC) #20
maniscalco
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom#newcode9 blimp/engine/mojo/blob_channel.mojom:9: // large data payloads out of the Mojo IPC ...
4 years, 6 months ago (2016-06-16 21:07:15 UTC) #21
Kevin M
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom#newcode9 blimp/engine/mojo/blob_channel.mojom:9: // large data payloads out of the Mojo IPC ...
4 years, 6 months ago (2016-06-21 17:19:46 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033013003/160001
4 years, 6 months ago (2016-06-21 17:20:18 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/219258) linux_chromium_compile_dbg_ng on ...
4 years, 6 months ago (2016-06-21 17:25:31 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033013003/180001
4 years, 6 months ago (2016-06-21 17:32:23 UTC) #28
maniscalco
https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom File blimp/engine/mojo/blob_channel.mojom (right): https://codereview.chromium.org/2033013003/diff/100001/blimp/engine/mojo/blob_channel.mojom#newcode9 blimp/engine/mojo/blob_channel.mojom:9: // large data payloads out of the Mojo IPC ...
4 years, 6 months ago (2016-06-21 17:33:15 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/204240)
4 years, 6 months ago (2016-06-21 17:42:01 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2033013003/200001
4 years, 6 months ago (2016-06-21 18:56:39 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/204306)
4 years, 6 months ago (2016-06-21 19:06:29 UTC) #35
Kevin M
+dcheng for IPC security review
4 years, 6 months ago (2016-06-23 18:15:25 UTC) #37
dcheng
https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/mojo/blob_channel_service.cc#newcode26 blimp/engine/mojo/blob_channel_service.cc:26: DCHECK(data.is_valid()); The comments imply this is coming from the ...
4 years, 6 months ago (2016-06-25 01:06:31 UTC) #38
Kevin M
https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/mojo/blob_channel_service.cc#newcode26 blimp/engine/mojo/blob_channel_service.cc:26: DCHECK(data.is_valid()); On 2016/06/25 01:06:31, dcheng wrote: > The comments ...
4 years, 5 months ago (2016-06-27 17:31:12 UTC) #39
dcheng
https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/renderer/blob_channel_sender_proxy.cc File blimp/engine/renderer/blob_channel_sender_proxy.cc (left): https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/renderer/blob_channel_sender_proxy.cc#oldcode38 blimp/engine/renderer/blob_channel_sender_proxy.cc:38: DCHECK(!IsInEngineCache(id)); On 2016/06/27 17:31:12, Kevin M wrote: > On ...
4 years, 5 months ago (2016-06-28 06:26:18 UTC) #40
Kevin M
https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/renderer/blob_channel_sender_proxy.cc File blimp/engine/renderer/blob_channel_sender_proxy.cc (left): https://codereview.chromium.org/2033013003/diff/200001/blimp/engine/renderer/blob_channel_sender_proxy.cc#oldcode38 blimp/engine/renderer/blob_channel_sender_proxy.cc:38: DCHECK(!IsInEngineCache(id)); On 2016/06/28 06:26:18, dcheng wrote: > On 2016/06/27 ...
4 years, 5 months ago (2016-06-28 18:18:53 UTC) #41
Wez
LGTM but please update the description to cover the other changes, e.g. to the way ...
4 years, 5 months ago (2016-07-01 01:06:57 UTC) #43
dcheng
mojo LGTM with comments addressed. https://codereview.chromium.org/2033013003/diff/240001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/240001/blimp/engine/mojo/blob_channel_service.cc#newcode37 blimp/engine/mojo/blob_channel_service.cc:37: auto mapping = data->Map(size); ...
4 years, 5 months ago (2016-07-01 02:04:28 UTC) #44
Kevin M
https://codereview.chromium.org/2033013003/diff/240001/blimp/engine/mojo/blob_channel_service.cc File blimp/engine/mojo/blob_channel_service.cc (right): https://codereview.chromium.org/2033013003/diff/240001/blimp/engine/mojo/blob_channel_service.cc#newcode27 blimp/engine/mojo/blob_channel_service.cc:27: LOG(ERROR) << "Invalid data handle received from renderer process."; ...
4 years, 5 months ago (2016-07-18 16:35:16 UTC) #48
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/2033013003/260001
4 years, 5 months ago (2016-07-18 16:35:50 UTC) #49
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 5 months ago (2016-07-18 18:39:31 UTC) #51
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-18 18:40:01 UTC) #52
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 18:41:15 UTC) #54
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/ca6057dcb4c724085356bda1706b48cf54e08fba
Cr-Commit-Position: refs/heads/master@{#406045}

Powered by Google App Engine
This is Rietveld 408576698