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

Issue 1951723002: Use the Mojo StubBindings interface correctly in WebUSB LayoutTests. (Closed)

Created:
4 years, 7 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use the Mojo StubBindings interface correctly in WebUSB LayoutTests. Instead of subclassing the stubClass type of the Mojo service being implemented we should call connection.bindHandleToStub to create a stub and then set our implementation as its delegate. The existing code instead unintentionally overrode the generated stub method bodies which was mostly harmless but broke passing interface pointers. While making this change it was discovered that if the DeviceManager connection is closed a call to requestDevices() would still attempt to access m_deviceManager. BUG=None Committed: https://crrev.com/9b73f1d2dcf4a5c7669fafffb8e670b5d421e4f8 Cr-Commit-Position: refs/heads/master@{#392190}

Patch Set 1 #

Patch Set 2 : Don't attempt to signal an error on a closed connection. #

Total comments: 4

Patch Set 3 : Check for undefined better. #

Patch Set 4 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -53 lines) Patch
M mojo/public/js/bindings.js View 3 chunks +3 lines, -14 lines 0 comments Download
M mojo/public/js/connection.js View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js View 9 chunks +28 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USB.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (14 generated)
Reilly Grant (use Gerrit)
Please take a look.
4 years, 7 months ago (2016-05-04 00:24:30 UTC) #3
haraken
https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode167 third_party/WebKit/Source/modules/webusb/USB.cpp:167: if (!m_deviceManager) { Does this mean that USB::onGetPermission can ...
4 years, 7 months ago (2016-05-04 03:26:15 UTC) #6
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode167 third_party/WebKit/Source/modules/webusb/USB.cpp:167: if (!m_deviceManager) { On 2016/05/04 at 03:26:15, haraken wrote: ...
4 years, 7 months ago (2016-05-04 18:20:41 UTC) #7
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp File third_party/WebKit/Source/modules/webusb/USB.cpp (right): https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode183 third_party/WebKit/Source/modules/webusb/USB.cpp:183: m_deviceManager->GetDeviceChanges(createBaseCallback(bind<usb::DeviceChangeNotificationPtr>(&USB::onDeviceChanges, WeakPersistentThisPointer<USB>(this)))); On 2016/05/04 at 03:26:15, haraken wrote: > ...
4 years, 7 months ago (2016-05-04 18:22:32 UTC) #8
haraken
On 2016/05/04 18:22:32, Reilly Grant wrote: > https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp > File third_party/WebKit/Source/modules/webusb/USB.cpp (right): > > https://codereview.chromium.org/1951723002/diff/20001/third_party/WebKit/Source/modules/webusb/USB.cpp#newcode183 ...
4 years, 7 months ago (2016-05-05 01:13:10 UTC) #9
Ken Rockot(use gerrit already)
lgtm
4 years, 7 months ago (2016-05-05 01:44:18 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951723002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951723002/20001
4 years, 7 months ago (2016-05-05 06:16:09 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/223962)
4 years, 7 months ago (2016-05-05 08:31:24 UTC) #14
Reilly Grant (use Gerrit)
Check for undefined better.
4 years, 7 months ago (2016-05-05 19:57:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951723002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951723002/40001
4 years, 7 months ago (2016-05-05 20:06:09 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/217135)
4 years, 7 months ago (2016-05-06 00:21:43 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951723002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951723002/40001
4 years, 7 months ago (2016-05-06 00:36:08 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/217252)
4 years, 7 months ago (2016-05-06 04:14:36 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1951723002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1951723002/60001
4 years, 7 months ago (2016-05-06 22:37:40 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-06 22:48:42 UTC) #28
commit-bot: I haz the power
4 years, 7 months ago (2016-05-06 22:50:04 UTC) #30
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/9b73f1d2dcf4a5c7669fafffb8e670b5d421e4f8
Cr-Commit-Position: refs/heads/master@{#392190}

Powered by Google App Engine
This is Rietveld 408576698