private void checkFrames(@NotNull final ThreadReference threadRef) throws EvaluateException {
    int frameCount = frameCount();
    if (myFramesFromBottom.size() < frameCount) {
      List<StackFrame> frames;
      try {
        frames = threadRef.frames(0, frameCount - myFramesFromBottom.size());
      }
      catch (IncompatibleThreadStateException | InternalException e) {
        throw EvaluateExceptionUtil.createEvaluateException(e);
      }

      int index = myFramesFromBottom.size() + 1;
      for (ListIterator<StackFrame> iterator = frames.listIterator(frameCount - myFramesFromBottom.size()); iterator.hasPrevious(); ) {
        myFramesFromBottom.add(new StackFrameProxyImpl(this, iterator.previous(), index));
        index++;
      }
    }
    else { // avoid leaking frames
      while (myFramesFromBottom.size() > frameCount) {
        myFramesFromBottom.removeLast();
      }
    }
  }
private void checkFrames(@NotNull final ThreadReference threadRef)