Bug 1418242 - [u2f-hid-rs] Let stubs fail, instead of running until cancellation r=jcj
authorTim Taubert <ttaubert@mozilla.com>
Thu, 16 Nov 2017 21:22:04 +0100
changeset 392335 3b1d7a28d1a522570825ec47fbcf831726ce6e99
parent 392334 5d567300c8f2b69f07747efc103de572d28ee2b8
child 392336 6dfe9e9f880079c77f54ae7d6501a7815ec4e772
push id97446
push userttaubert@mozilla.com
push dateFri, 17 Nov 2017 11:32:51 +0000
treeherdermozilla-inbound@3b1d7a28d1a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcj
bugs1418242
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1418242 - [u2f-hid-rs] Let stubs fail, instead of running until cancellation r=jcj https://github.com/jcjones/u2f-hid-rs/commit/1b1d79e65366f0457c3c183a36c86a11a04fb836
dom/webauthn/u2f-hid-rs/src/stub/mod.rs
--- a/dom/webauthn/u2f-hid-rs/src/stub/mod.rs
+++ b/dom/webauthn/u2f-hid-rs/src/stub/mod.rs
@@ -2,44 +2,45 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // No-op module to permit compiling token HID support for Android, where
 // no results are returned.
 
 #![allow(dead_code)]
 
-use util::OnceCallback;
+use util::{io_err, OnceCallback};
 
 pub struct PlatformManager {}
 
 impl PlatformManager {
     pub fn new() -> Self {
         Self {}
     }
 
     pub fn register(
         &mut self,
         timeout: u64,
         challenge: Vec<u8>,
         application: Vec<u8>,
         key_handles: Vec<Vec<u8>>,
         callback: OnceCallback<Vec<u8>>,
     ) {
-        // No-op on Android
+        // Not implemented.
+        callback.call(Err(io_err("not implemented")));
     }
 
     pub fn sign(
         &mut self,
         timeout: u64,
         challenge: Vec<u8>,
         application: Vec<u8>,
         key_handles: Vec<Vec<u8>>,
         callback: OnceCallback<(Vec<u8>, Vec<u8>)>,
     ) {
-        // No-op on Android
+        // Not implemented.
+        callback.call(Err(io_err("not implemented")));
     }
 
-    // This blocks.
     pub fn cancel(&mut self) {
-        // No-op on Android
+        // No-op.
     }
 }