I realized that the refactor to use ReactDebugCurrentFrame as a decoupled stack frame for error messages is not reentrant: https://github.com/facebook/react/pull/10105/files#r127573520

Fiber is not reentrant but other renderers might be. The synchronous server renderer is atm.

We should add tests for warnings between renderers, such as calling a server-render from within a client render, and update the set/reset callsites to use push/pop instead to account for that.

return null;
    }
    let out = '';
    while (out.length < bytes) {
      if (this.stack.length === 0) {
        this.exhausted = true;
        break;
      }
      const frame: Frame = this.stack[this.stack.length - 1];
      if (frame.childIndex >= frame.children.length) {
        const footer = frame.footer;
        out += footer;
        if (footer !== '') {
          this.previousWasTextNode = false;
        }
        this.stack.pop();
        if (frame.type === 'select') {
          this.currentSelectValue = null;
        } else if (
          frame.type != null &&
          frame.type.type != null &&
          frame.type.type.$$typeof === REACT_PROVIDER_TYPE
        ) {
          const provider: ReactProvider<any> = (frame.type: any);
          this.popProvider(provider);
        }
        continue;
      }
      const child = frame.children[frame.childIndex++];
      if (__DEV__) {