Index: build/chrome/cackey.js ================================================================== --- build/chrome/cackey.js +++ build/chrome/cackey.js @@ -409,11 +409,11 @@ if (GoogleSmartCard.IS_DEBUG_BUILD) { console.log("[cackey] Asked to provide a list of certificates -- throwing that request over to the NaCl side... "); } - callbackId = cackeyOutstandingCallbackCounter + 1; + callbackId = ++cackeyOutstandingCallbackCounter; cackeyInitPCSC(function() { cackeyHandle.postMessage( { 'target': "cackey", @@ -420,11 +420,10 @@ 'command': "listcertificates", 'id': callbackId } ); - cackeyOutstandingCallbackCounter = callbackId; cackeyOutstandingCallbacks[callbackId] = chromeCallback; if (GoogleSmartCard.IS_DEBUG_BUILD) { console.log("[cackey] Thrown."); } @@ -441,11 +440,11 @@ if (GoogleSmartCard.IS_DEBUG_BUILD) { console.log("[cackey] Asked to provide a list of readers -- throwing that request over to the NaCl side... "); } - callbackId = cackeyOutstandingCallbackCounter + 1; + callbackId = ++cackeyOutstandingCallbackCounter; cackeyInitPCSC(function() { cackeyHandle.postMessage( { 'target': "cackey", @@ -452,11 +451,10 @@ 'command': "listreaders", 'id': callbackId } ); - cackeyOutstandingCallbackCounter = callbackId; cackeyOutstandingCallbacks[callbackId] = chromeCallback; if (GoogleSmartCard.IS_DEBUG_BUILD) { console.log("[cackey] Thrown."); } @@ -503,11 +501,11 @@ if (GoogleSmartCard.IS_DEBUG_BUILD) { console.log("[cackey] Asked to sign a message -- throwing that request over to the NaCl side... "); } - callbackId = cackeyOutstandingCallbackCounter + 1; + callbackId = ++cackeyOutstandingCallbackCounter; command = { 'target': "cackey", 'command': "sign", 'id': callbackId, @@ -524,11 +522,10 @@ } cackeyInitPCSC(function() { cackeyHandle.postMessage(command); - cackeyOutstandingCallbackCounter = callbackId; cackeyOutstandingCallbacks[callbackId] = chromeCallback; if (GoogleSmartCard.IS_DEBUG_BUILD) { console.log("[cackey] Thrown."); }