Package org.chromium.sdk.internal.v8native.protocol.input.data

Examples of org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle


            "'value':{'ref':55517,'value':2,'type':'number'}}," +
            "{'name':1,'value':" + propertyRefText + "}," +
            "{'name':3,'value':"+ propertyRefText +"}],'type':'object'}"
        ).replace('\'', '"');
    JSONObject valueHandleJson = (JSONObject) JSONValue.parse(valueHandleJsonText);
    ValueHandle valueHandle =
        V8ProtocolParserAccess.get().parseValueHandle(valueHandleJson);
    arrayMirror = internalContext.getValueLoader().addDataToMap(valueHandle);

    String proptoHandleJsonText = (
            "{'text':'#<an Object>', 'handle':55516,'className':'Object','type':'object'}"
         ).replace('\'', '"');
    JSONObject protoHandleJson = (JSONObject) JSONValue.parse(proptoHandleJsonText);
    ValueHandle protoHandle = V8ProtocolParserAccess.get().parseValueHandle(protoHandleJson);
    internalContext.getValueLoader().addDataToMap(protoHandle);



    FrameObject frameObject;
View Full Code Here


    V8CommandProcessor.V8HandlerCallback commandCallback = callback == null
        ? null
        : new V8CommandCallbackBase() {
          @Override
          public void success(SuccessCommandResponse successResponse) {
            ValueHandle body;
            try {
              body = successResponse.body().asEvaluateBody();
            } catch (JsonProtocolParseException e) {
              throw new RuntimeException(e);
            }
View Full Code Here

          try {
            body = successResponse.body().asSetVariableValueBody();
          } catch (JsonProtocolParseException e) {
            throw new RuntimeException(e);
          }
          ValueHandle newValueHandle = body.newValue();
          ValueLoaderImpl valueLoader = internalContext.getValueLoader();
          ValueMirror mirror = valueLoader.addDataToMap(newValueHandle);
          JsValueBase value = JsVariableBase.createValue(valueLoader, mirror);
          callback.success(value);
        }
View Full Code Here

  public void addHandleFromRefs(SomeHandle handle) {
    if (HandleManager.isSpecialType(handle.type())) {
      specialHandleManager.put(handle.handle(), handle);
    } else {
      ValueHandle valueHandle;
      try {
        valueHandle = handle.asValueHandle();
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }
View Full Code Here

      int ref = propertyRefIds.get(i).intValue();
      JSONObject value = JsonUtil.getAsJSON(body, String.valueOf(ref));
      if (value == null) {
        throw new ValueLoadException("Failed to find value for ref=" + ref);
      }
      ValueHandle valueHandle;
      try {
        valueHandle = V8ProtocolParserAccess.get().parseValueHandle(value);
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }

      long refLong = valueHandle.handle();
      if (refLong != ref) {
        throw new ValueLoadException("Inconsistent ref in response, ref=" + ref);
      }
      ValueMirror mirror = addDataToMap(valueHandle);
      result.add(mirror);
View Full Code Here

      int ref = propertyRefIds.get(i).intValue();
      JSONObject value = JsonUtil.getAsJSON(body, String.valueOf(ref));
      if (value == null) {
        throw new ValueLoadException("Failed to find value for ref=" + ref);
      }
      ValueHandle valueHandle;
      try {
        valueHandle = V8ProtocolParserAccess.get().parseValueHandle(value);
      } catch (JsonProtocolParseException e) {
        throw new ValueLoadException(e);
      }
View Full Code Here

  public void addHandleFromRefs(SomeHandle handle) {
    if (HandleManager.isSpecialType(handle.type())) {
      specialHandleManager.put(handle.handle(), handle);
    } else {
      ValueHandle valueHandle;
      try {
        valueHandle = handle.asValueHandle();
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }
View Full Code Here

      int ref = propertyRefIds.get(i).intValue();
      JSONObject value = JsonUtil.getAsJSON(body, String.valueOf(ref));
      if (value == null) {
        throw new ValueLoadException("Failed to find value for ref=" + ref);
      }
      ValueHandle valueHandle;
      try {
        valueHandle = V8ProtocolParserAccess.get().parseValueHandle(value);
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }

      long refLong = valueHandle.handle();
      if (refLong != ref) {
        throw new ValueLoadException("Inconsistent ref in response, ref=" + ref);
      }
      ValueMirror mirror = addDataToMap(valueHandle);
      result.add(mirror);
View Full Code Here

      int ref = propertyRefIds.get(i).intValue();
      JSONObject value = JsonUtil.getAsJSON(body, String.valueOf(ref));
      if (value == null) {
        throw new ValueLoadException("Failed to find value for ref=" + ref);
      }
      ValueHandle valueHandle;
      try {
        valueHandle = V8ProtocolParserAccess.get().parseValueHandle(value);
      } catch (JsonProtocolParseException e) {
        throw new ValueLoadException(e);
      }
View Full Code Here

  }

  private ExceptionData createException(EventNotification response, BreakEventBody body,
      InternalContext internalContext) {
    List<SomeHandle> refs = response.refs();
    ValueHandle exception = body.exception();
    ValueLoaderImpl valueLoader = internalContext.getValueLoader();
    for (SomeHandle handle : refs) {
      valueLoader.addHandleFromRefs(handle);
    }
    valueLoader.addHandleFromRefs(exception.getSuper());

    // source column is not exposed ("sourceColumn" in "body")
    String sourceText = body.sourceLineText();

    ValueMirror mirror = valueLoader.addDataToMap(exception);

    return new ExceptionDataImpl(internalContext,
        mirror,
        EXCEPTION_NAME,
        body.uncaught(),
        sourceText,
        exception.text());
  }
View Full Code Here

TOP

Related Classes of org.chromium.sdk.internal.v8native.protocol.input.data.ValueHandle

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.