src_js/sspi_client.js
function (sspiClient) {
      if (!initializeExecutionCompleted) {
        // You cannot user process.nextTick() here as it will block all
        // I/O which means initialization in native code will never get
        // a chance to run and the process will just hang.
        setImmediate(invokeGetNextBlob, sspiClient);
      } else if (!initializeSucceeded) {
        cb(null, null, initializeErrorCode, initializeErrorString);
      } else {
        sspiClient.sspiClientImpl.getNextBlob(serverResponse, serverResponseBeginOffset, serverResponseLength,
          // Cannot use => function syntax here as that does not have the 'arguments'.
          function() {
            sspiClient.getNextBlobInProgress = false;
            cb.apply(null, arguments);
          });
      }
    }
function (sspiClient) {
      if (!initializeExecutionCompleted) {
        // You cannot user process.nextTick() here as it will block all
        // I/O which means initialization in native code will never get
        // a chance to run and the process will just hang.
        setImmediate(invokeGetNextBlob, sspiClient);
      } else if (!initializeSucceeded) {
        cb(null, null, initializeErrorCode, initializeErrorString);
      } else {
        sspiClient.sspiClientImpl.getNextBlob(serverResponse, serverResponseBeginOffset, serverResponseLength,
          // Cannot use => function syntax here as that does not have the 'arguments'.
          function() {
            sspiClient.getNextBlobInProgress = false;
            cb.apply(null, arguments);
          });
      }
    }
function ( sspiClient ) { if ( ! initializeExecutionCompleted ) { // You cannot user process.nextTick() here as it will block all // I/O which means initialization in native code will never get // a chance to run and the process will just hang. setImmediate ( invokeGetNextBlob , sspiClient ) ; } else if ( ! initializeSucceeded ) { cb ( null , null , initializeErrorCode , initializeErrorString ) ; } else { sspiClient . sspiClientImpl . getNextBlob ( serverResponse , serverResponseBeginOffset , serverResponseLength , // Cannot use => function syntax here as that does not have the 'arguments'. function ( ) { sspiClient . getNextBlobInProgress = false ; cb . apply ( null , arguments ) ; } ) ; } }
Wait for initialization to complete. If initialization fails, invoke callback with error information. Else, invoke native implementation.
Wait for initialization to complete . If initialization fails invoke callback with error information . Else invoke native implementation .