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

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: Rebased. Created 4 years, 7 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 c0d31969cb0716322bacd1c8ffa8e9f4a99d8cef..0d48fefee1d5251fa701692982fb2c92aaa390c3 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USB.cpp
@@ -162,6 +162,11 @@ void USB::onGetPermission(ScriptPromiseResolver* resolver, usb::DeviceInfoPtr de
return;
m_chooserServiceRequests.remove(requestEntry);
+ if (!m_deviceManager) {
+ 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