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

Unified Diff: third_party/WebKit/Source/modules/webusb/USB.cpp

Issue 1951723002: Use the Mojo StubBindings interface correctly in WebUSB LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't attempt to signal an error on a closed connection. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webusb/USB.cpp
diff --git a/third_party/WebKit/Source/modules/webusb/USB.cpp b/third_party/WebKit/Source/modules/webusb/USB.cpp
index 8f4ec193593544030640364e46fbfb2017f3423b..72ea07bb53310bf73148e23a294b7a9a22449904 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USB.cpp
@@ -164,6 +164,11 @@ void USB::onGetPermission(ScriptPromiseResolver* resolver, usb::DeviceInfoPtr de
if (!isActive(resolver))
return;
+ if (!m_deviceManager) {
haraken 2016/05/04 03:26:15 Does this mean that USB::onGetPermission can be ca
Reilly Grant (use Gerrit) 2016/05/04 18:20:41 No, the issue is that m_deviceManager and m_choose
+ resolver->reject(DOMException::create(NotFoundError, kNoServiceError));
+ return;
+ }
+
if (deviceInfo) {
usb::DevicePtr device;
m_deviceManager->GetDevice(deviceInfo->guid, mojo::GetProxy(&device));
« no previous file with comments | « third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698