Processess the Javascript response and generates the required objects
that are then passed back to the original callback.

@param results
@param status
427220
public void processResponse(Object results, Object status) {
        ElevationStatus pStatus = ElevationStatus.UNKNOWN_ERROR;
        
        if (status instanceof String && results instanceof JSObject) {
            pStatus = ElevationStatus.valueOf((String) status);
            if (ElevationStatus.OK.equals(pStatus)) {
                JSObject jsres = (JSObject) results;
                Object len = jsres.getMember("length");
                if (len instanceof Number) {
                    int n = ((Number)len).intValue();
                    ElevationResult[] ers = new ElevationResult[n];
                    for (int i = 0; i < n; i++) {
                        Object obj = jsres.getSlot(i);
                        if (obj instanceof JSObject) {
                            ers[i] = new ElevationResult((JSObject) obj);
                        }
                    }
                    callback.elevationsReceived(ers, pStatus);
                    return;
                }
            }
        }
        callback.elevationsReceived(new ElevationResult[]{}, pStatus);
    }
216669
public void requestCompleted (T result)
    {
        if (_chain != null) {
            _chain.requestCompleted(result);

        } else if (_invChain instanceof InvocationService.ResultListener) {
            ((InvocationService.ResultListener)_invChain).requestProcessed(result);

        } else if (_invChain instanceof InvocationService.ConfirmListener) {
            ((InvocationService.ConfirmListener)_invChain).requestProcessed();
        }
    }
614647
function resultRaw (results) {
    // throw error if results required and not retrieved
    if (this.args.required && !results.length) {
        // throw error
        throw this.error('no records found')
    }
    // if only ids were selected the return result object to fetch records
    if (this.select.isSelectOnlyIds) {
        // build result object
        var result = new ImmutableCoreModelResult({
            query: this,
            results: results,
        })
        // return result or all records if specified
        return this.args.all ? result.all() : result
    }
    // otherwise return ImmutableCoreModelInstance record(s)
    else {
        // query is for a single record
        if (this.args.limit === 1) {
            // return new instance or undefined
            return results.length
                ? this.newInstance(results[0])
                : undefined
        }
        // query is for multiple records
        else {
            return _.map(results, result => this.newInstance(result))
        }
    }
}
1261422
function handleUniqueResult(results) {
      var res = [], flag = {};
      for (var i = 0; i<results.length; i++) {
        if (flag[results[i][self.displayProperty1]]) continue;
        flag[results[i][self.displayProperty1]] = true;
        res.push(results[i]);
      }
      return res;
    }
132364
def _handle_results(options):
    """"""
    results_processor = options.get('_process_results')
    if not results_processor:
        results_processor = _process_results

    processor_result = results_processor()
    if isinstance(processor_result, (Async, Context)):
        processor_result.start()
870026
public void setResult(T result) {
        lock.lock();
        try {
            if(Objects.equals(expected_result, result))
                super.setResult(result);
        }
        finally {
            lock.unlock();
        }
    }
58898
protected void processResult(RHI aggregatedResult) {
        // Process the result with all result handlers
        for (ResultHandler<RHI> resultHandler : resultHandlers) {
            resultHandler.handleResult(aggregatedResult);
        }
    }
923728
public void requestProcessed (Object result)
    {
        @SuppressWarnings("unchecked") V value = (V)result;
        _sync.innerSet(value);
    }
907898
function(results, status){
      if (status === google.maps.GeocoderStatus.OK) {
        var result = results[0];
        this.$input.val(result.formatted_address);
        this.update(result);

        if (results.length > 1){
          this.trigger("geocode:multiple", results);
        }

      } else {
        this.trigger("geocode:error", status);
      }
    }
706017
protected ExecutionResult postExecute(ExecutionResult result) {
    if (isFailure(result)) {
      result = onFailure(result.with(false, false));
      callFailureListener(result);
    } else {
      result = result.with(true, true);
      onSuccess(result);
      callSuccessListener(result);
    }

    return result;
  }
450868
@Override
    public void handle(T result, HttpResponse response) {
        result.setRestoreOutputPath(response.getHeaders().get(Headers.S3_RESTORE_OUTPUT_PATH));
    }
792132
def add_result(self, result):
        
        for handler in self._handlers:
            handler(result)
        if self._successful and result.status not in _successful_results:
            self._successful = False
1110305
private function handleResult($result): void
    {
        if ($result instanceof ActionResultInterface) {
            $result->updateResponse($this->getApplication(), $this->getRequest(), $this->getResponse());

            return;
        }

        if ($result === null) {
            return;
        }

        $this->getResponse()->setContent(json_encode($result));
        $this->getResponse()->setHeader('Content-Type', 'application/json');
    }
970728
public static void validateResults(Map<Integer, Object> results) {
        for (Object result : results.values()) {
            if (result != null && result instanceof CacheClearResponse) {
                Object response = ((CacheClearResponse) result).getResponse();
                if (response instanceof Throwable) {
                    ExceptionUtil.sneakyThrow((Throwable) response);
                }
            }
        }
    }
202464
@Override
    public void onResponse(ReadResultSet<ReliableTopicMessage> result) {
        // we process all messages in batch. So we don't release the thread and reschedule ourselves;
        // but we'll process whatever was received in 1 go.
        for (Object item : result) {
            ReliableTopicMessage message = (ReliableTopicMessage) item;

            if (cancelled) {
                return;
            }

            try {
                listener.storeSequence(sequence);
                process(message);
            } catch (Throwable t) {
                if (terminate(t)) {
                    cancel();
                    return;
                }
            }

            sequence++;
        }
        next();
    }
507717
function(results) {
			// Only do so if `callback` is specified
			if (IODOpts.callback) {
				var options = { url: IODOpts.callback.uri }
				var res = JSON.stringify(results)

				// Url-encode use `form` property
				if (IODOpts.callback.method === 'encoded') {
					options.form = { results: res }
				}

				var r = request.post(options, function(err, res) {
					// Emits `CbError` if any error occurs while sending results to callback
					if (err) IOD.eventEmitter.emit('CbError', err)
					else if (res.statusCode !== 200) {
						IOD.eventEmitter.emit('CbError', 'Status Code: ' + res.statusCode)
					}
				})

				// Multipart use form object
				if (IODOpts.callback.method === 'multipart') {
					var form = r.form()
					form.append('results', res)

					form.on('error', function(err) {
						IOD.evenEmitter.emit('CBError', err)
					})
				}
			}
		}
41903
function processResult(loaderContext, resultPromise) {
  const { callback } = loaderContext;

  resultPromise
    .then(
      ({ css, map, imports }) => {
        imports.forEach(loaderContext.addDependency, loaderContext);
        return {
          // Removing the sourceMappingURL comment.
          // See removeSourceMappingUrl.js for the reasoning behind this.
          css: removeSourceMappingUrl(css),
          map: typeof map === 'string' ? JSON.parse(map) : map,
        };
      },
      (lessError) => {
        if (lessError.filename) {
          loaderContext.addDependency(lessError.filename);
        }
        throw formatLessError(lessError);
      }
    )
    .then(({ css, map }) => {
      callback(null, css, map);
    }, callback);
}