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.

lifecycle.push('shouldComponentUpdate');
          }
          UNSAFE_componentWillReceiveProps() {
            lifecycle.push('componentWillReceiveProps');
          }
          componentWillUnmount() {
            lifecycle.push('componentWillUnmount');
          }
        }
        const response = ReactDOMServer.renderToStaticMarkup(<TestComponent />);
        expect(response).toBe('<span>Component name: TestComponent</span>');
        expect(lifecycle).toEqual([
          'getInitialState',
          'componentWillMount',
          'render',
        ]);
      }
      runTest();
    });
    it('should throw with silly args', () => {
      expect(
        ReactDOMServer.renderToStaticMarkup.bind(ReactDOMServer, {x: 123}),
      ).toThrowError(
        'Objects are not valid as a React child (found: object with keys {x})',
      );
    });
    it('allows setState in componentWillMount without using DOM', () => {
      class Component extends React.Component {