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.

/>
          </div>
        );
      }
    }
    const container = document.createElement('div');
    document.body.appendChild(container);
    try {
      ReactDOM.render(<Wrapper />, container);
      const expected = [
        '1st node clicked',
        "2nd node clicked imperatively from 1st's handler",
      ];
      expect(actual).toEqual(expected);
    } finally {
      document.body.removeChild(container);
    }
  });
  it('should not crash with devtools installed', () => {
    try {
      global.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
        inject: function() {},
        onCommitFiberRoot: function() {},
        onCommitFiberUnmount: function() {},
        supportsFiber: true,
      };
      jest.resetModules();
      React = require('react');
      ReactDOM = require('react-dom');
      class Component extends React.Component {