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

Unified Diff: chrome/browser/resources/cryptotoken/gnubbies.js

Issue 308173002: Fix race and remove unused features in cryptotoken extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix type annotation Created 6 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 | « chrome/browser/resources/cryptotoken/enroller.js ('k') | chrome/browser/resources/cryptotoken/gnubby.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/cryptotoken/gnubbies.js
diff --git a/chrome/browser/resources/cryptotoken/gnubbies.js b/chrome/browser/resources/cryptotoken/gnubbies.js
index 77264550be4b13ce407cc359641b7fac94128393..87b9baf49cf0ef383694697c1fa6760853de076f 100644
--- a/chrome/browser/resources/cryptotoken/gnubbies.js
+++ b/chrome/browser/resources/cryptotoken/gnubbies.js
@@ -189,7 +189,6 @@ Gnubbies.prototype.inactivityTimeout_ = function() {
console.warn(namespace + ' device ' + deviceId +
' still open after inactivity, closing');
this.openDevs_[namespace][deviceId].destroy();
- this.removeOpenDevice({namespace: namespace, device: deviceId});
}
}
};
@@ -210,7 +209,7 @@ Gnubbies.prototype.addClient = function(which, who, cb) {
if (gnubby.closing) {
// Device is closing or already closed.
self.removeClient(gnubby, who);
- if (cb) { cb(-llGnubby.GONE); }
+ if (cb) { cb(-llGnubby.NODEVICE); }
} else {
gnubby.registerClient(who);
if (cb) { cb(-llGnubby.OK, gnubby); }
@@ -275,7 +274,7 @@ Gnubbies.prototype.addClient = function(which, who, cb) {
if (!this.pendingOpens_.hasOwnProperty(which.namespace)) {
this.pendingOpens_[which.namespace] = {};
}
- if (this.pendingOpens_[which.namespace].hasOwnProperty(which)) {
+ if (this.pendingOpens_[which.namespace].hasOwnProperty(which.device)) {
this.pendingOpens_[which.namespace][which.device].push(opener);
} else {
this.pendingOpens_[which.namespace][which.device] = [opener];
« no previous file with comments | « chrome/browser/resources/cryptotoken/enroller.js ('k') | chrome/browser/resources/cryptotoken/gnubby.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698