Package org.chromium.sdk.JsEvaluateContext

Examples of org.chromium.sdk.JsEvaluateContext.ResultOrException


          return paramsWithResponse;
        }

        @Override
        public Step<ResultOrException> processResponse(EVAL_DATA response) {
          ResultOrException resultOrException =
              commandHandler.processResult(response, destinationValueLoader, valueNameBuidler);

          clearTempObjectAsync();

          return WipRelayRunner.createFinalStep(resultOrException);
View Full Code Here


          return paramsWithResponse;
        }

        @Override
        public Step<ResultOrException> processResponse(EVAL_DATA response) {
          ResultOrException resultOrException =
              commandHandler.processResult(response, destinationValueLoader);

          clearTempObjectAsync();

          return WipRelayRunner.createFinalStep(resultOrException);
View Full Code Here

      return true;
    }

    @Override
    public boolean verifyValue(String expression) throws DebugException {
      ResultOrException resultOrException = evaluateExpressionString(expression);
      return resultOrException.accept(new ResultOrException.Visitor<Boolean>() {
        @Override public Boolean visitResult(JsValue value) {
          return true;
        }
        @Override public Boolean visitException(JsValue exception) {
          return false;
View Full Code Here

      setValue(jsValue);
    }

    public void setValue(String expression) throws DebugException {
      // TODO: support setters explicitly.
      ResultOrException newValueOrException = evaluateExpressionString(expression);
      if (newValueOrException.getResult() == null) {
        String message = getExceptionMessage(newValueOrException.getException(),
            getEvaluateContext().getJsEvaluateContext());
        Status status = new Status(IStatus.ERROR, ChromiumDebugPlugin.PLUGIN_ID,
            DebugException.TARGET_REQUEST_FAILED,
            "JavaScript compile exception: " + message, null);
        throw new DebugException(status);
      } else {
        setValue(newValueOrException.getResult());
      }
    }
View Full Code Here

TOP

Related Classes of org.chromium.sdk.JsEvaluateContext.ResultOrException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.