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

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


      }
    };
  }

  public static Long getScriptId(HandleManager handleManager, long scriptRef) {
    SomeHandle handle = handleManager.getHandle(scriptRef);
    if (handle == null) {
      return -1L; // not found
    }
    ScriptHandle scriptHandle;
    try {
      scriptHandle = handle.asScriptHandle();
    } catch (JsonProtocolParseException e) {
      throw new RuntimeException(e);
    }
    return scriptHandle.id();
  }
View Full Code Here


   */
  public static ScriptHandle validScript(ScriptHandle script, List<SomeHandle> refs,
      V8ContextFilter contextFilter) {
    Long contextRef = V8ProtocolUtil.getObjectRef(script.context());
    for (int i = 0, size = refs.size(); i < size; i++) {
      SomeHandle ref = refs.get(i);
      if (ref.handle() != contextRef.longValue()) {
        continue;
      }
      ContextHandle contextHandle;
      try {
        contextHandle = ref.asContextHandle();
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }
      if (!contextFilter.isContextOurs(contextHandle)) {
        return null;
View Full Code Here

      }
    };
  }

  public static Long getScriptId(HandleManager handleManager, long scriptRef) {
    SomeHandle handle = handleManager.getHandle(scriptRef);
    if (handle == null) {
      return -1L; // not found
    }
    ScriptHandle scriptHandle;
    try {
      scriptHandle = handle.asScriptHandle();
    } catch (JsonProtocolParseException e) {
      throw new RuntimeException(e);
    }
    return scriptHandle.id();
  }
View Full Code Here

  private final ConcurrentMap<Long, SomeHandle> refToHandle =
      new ConcurrentHashMap<Long, SomeHandle>();

  void put(Long ref, SomeHandle smthWithHandle) {
    SomeHandle oldObject = refToHandle.putIfAbsent(ref, smthWithHandle);
    if (oldObject != null) {
      mergeValues(oldObject, smthWithHandle);
    }
  }
View Full Code Here

   */
  public static ScriptHandle validScript(ScriptHandle script, List<SomeHandle> refs,
      V8ContextFilter contextFilter) {
    Long contextRef = V8ProtocolUtil.getObjectRef(script.context());
    for (int i = 0, size = refs.size(); i < size; i++) {
      SomeHandle ref = refs.get(i);
      if (ref.handle() != contextRef.longValue()) {
        continue;
      }
      ContextHandle contextHandle;
      try {
        contextHandle = ref.asContextHandle();
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }
      if (!contextFilter.isContextOurs(contextHandle)) {
        return null;
View Full Code Here

TOP

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

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.