Package org.chromium.sdk.internal.v8native

Examples of org.chromium.sdk.internal.v8native.ContextBuilder


    final boolean isEvent = true;
    if (isEvent) {
      String event = eventMessage.event();
      DebugSession debugSession = getDebugSession();

      ContextBuilder contextBuilder = debugSession.getContextBuilder();

      ContextBuilder.ExpectingBreakEventStep step1 = contextBuilder.buildNewContext();

      InternalContext internalContext = step1.getInternalContext();

      BreakEventBody breakEventBody;
      try {
        breakEventBody = eventMessage.body().asBreakEventBody();
      } catch (JsonProtocolParseException e) {
        throw new RuntimeException(e);
      }

      ContextBuilder.ExpectingBacktraceStep step2;
      if (V8Protocol.EVENT_BREAK.key.equals(event)) {
        Collection<Breakpoint> breakpointsHit = getBreakpointsHit(eventMessage, breakEventBody);
        step2 = step1.setContextState(breakpointsHit, null);
      } else if (V8Protocol.EVENT_EXCEPTION.key.equals(event)) {
        ExceptionData exception = createException(eventMessage, breakEventBody,
            internalContext);
        step2 = step1.setContextState(Collections.<Breakpoint> emptySet(), exception);
      } else {
        contextBuilder.buildSequenceFailure();
        throw new RuntimeException();
      }

      processNextStep(step2);
    }
View Full Code Here

TOP

Related Classes of org.chromium.sdk.internal.v8native.ContextBuilder

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.