Diff

Differences From Artifact [76d1838f47]:

To Artifact [42af92888f]:


   138    138   	if (messageEvent.data.status != "success") {
   139    139   		if (messageEvent.data.originalrequest) {
   140    140   			if (messageEvent.data.originalrequest.certificate) {
   141    141   				delete cackeyCertificateToPINMap[cackeyCertificateToPINID(messageEvent.data.originalrequest.certificate)];
   142    142   			}
   143    143   		}
   144    144   	}
          145  +
          146  +	if (messageEvent.data.command == "init" && messageEvent.data.status == "success") {
          147  +		if (GoogleSmartCard.IS_DEBUG_BUILD) {
          148  +			console.log("[cackey] Initialization completed, resending any queued messages");
          149  +		}
          150  +
          151  +		cackeyInitPCSCCompleted();
          152  +	}
   145    153   
   146    154   	if (messageEvent.data.id == null) {
   147    155   		return;
   148    156   	}
   149    157   
   150    158   	chromeCallback = cackeyOutstandingCallbacks[messageEvent.data.id];
   151    159   
................................................................................
   666    674   			"focused": true,
   667    675   			"innerBounds": {
   668    676   				"width": 350,
   669    677   				"minWidth": 350,
   670    678   				"height": 135,
   671    679   				"minHeight": 135
   672    680   			}
          681  +		}, function(uiWindow) {
          682  +			if (!uiWindow) {
          683  +				return;
          684  +			}
          685  +
          686  +			uiWindow.contentWindow.parentWindow = window;
   673    687   		});
   674    688   	});
   675    689   
   676    690   	/*
   677    691   	 * Register a handler for dealing with the PCSC port being disconnected
   678    692   	 */
   679    693   	oldOnPortDisconnectedFunction = GoogleSmartCard.Pcsc.prototype.onPortDisconnected_;
................................................................................
   688    702   	/*
   689    703   	 * Register a handler for dealing with the PCSC port being available
   690    704   	 */
   691    705   	oldPCSCInitializationCallback = GoogleSmartCard.PcscNacl.prototype.pcscInitializationCallback_;
   692    706   	GoogleSmartCard.PcscNacl.prototype.pcscInitializationCallback_ = function(requestId, instanceId, instance, error) {
   693    707   		oldPCSCInitializationCallback.apply(this, [requestId, instanceId, instance, error]);
   694    708   
   695         -		cackeyInitPCSCCompleted();
   696         -
   697    709   		return;
   698    710   	};
   699    711   
   700    712   	/*
   701    713   	 * Initialize global state
   702    714   	 */
   703    715   	cackeyInitGlobalState();