Check-in [bdb2e8cfb1]
Overview
SHA1:bdb2e8cfb1ef1a3388cde3524ed99436bf529112
Date: 2016-02-28 22:12:14
User: rkeene
Comment:ChromeOS: Delayed PCSC initialization even further until we receieved positive confirmation that initialization completed
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-28
22:37
[1a6c58edd1] ChromeOS: Added basic UI page that shows certificates (user: rkeene, tags: trunk)
22:12
[bdb2e8cfb1] ChromeOS: Delayed PCSC initialization even further until we receieved positive confirmation that initialization completed (user: rkeene, tags: trunk)
21:22
[789f3b2324] ChromeOS: Improved cleanup after crash (user: rkeene, tags: trunk)
Changes

Modified build/chrome/cackey.js from [76d1838f47] to [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();