Skip to content

Commit

Permalink
Cleanup after facebook#8353
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiebits committed Nov 23, 2016
1 parent 0c885af commit 8d3635a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
5 changes: 2 additions & 3 deletions src/renderers/dom/stack/client/__tests__/ReactDOM-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
var React = require('React');
var ReactDOM = require('ReactDOM');
var ReactTestUtils = require('ReactTestUtils');
var div = React.createFactory('div');

describe('ReactDOM', () => {
// TODO: uncomment this test once we can run in phantom, which
Expand Down Expand Up @@ -54,15 +53,15 @@ describe('ReactDOM', () => {

it('should allow children to be passed as an argument', () => {
var argDiv = ReactTestUtils.renderIntoDocument(
div(null, 'child')
React.DOM.div(null, 'child')
);
var argNode = ReactDOM.findDOMNode(argDiv);
expect(argNode.innerHTML).toBe('child');
});

it('should overwrite props.children with children argument', () => {
var conflictDiv = ReactTestUtils.renderIntoDocument(
div({children: 'fakechild'}, 'child')
React.DOM.div({children: 'fakechild'}, 'child')
);
var conflictNode = ReactDOM.findDOMNode(conflictDiv);
expect(conflictNode.innerHTML).toBe('child');
Expand Down
11 changes: 0 additions & 11 deletions src/renderers/noop/ReactNoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,13 @@ var NoopRenderer = ReactFiberReconciler({
},

prepareForCommit() : void {
if (isCommitting) {
throw new Error('Double prepare before commit');
}
isCommitting = true;
},

resetAfterCommit() : void {
if (!isCommitting) {
throw new Error('Double reset after commit');
}
isCommitting = false;
},

});

var isCommitting = false;
var rootContainers = new Map();
var roots = new Map();
var DEFAULT_ROOT_ID = '<default>';
Expand Down Expand Up @@ -270,8 +261,6 @@ var ReactNoop = {

syncUpdates: NoopRenderer.syncUpdates,

isCommitting: () => isCommitting,

// Logs the current state of the tree.
dumpTree(rootID : string = DEFAULT_ROOT_ID) {
const root = roots.get(rootID);
Expand Down
4 changes: 0 additions & 4 deletions src/renderers/shared/fiber/ReactFiberScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) {
// Need this to prevent recursion while in a Task loop.
let isPerformingTaskWork : boolean = false;

// We'll only prepare/reset on the outermost commit even when a setState
// callback causes another synchronous rerender
let isCommitting : boolean = false;

// The next work in progress fiber that we're currently working on.
let nextUnitOfWork : ?Fiber = null;
let nextPriorityLevel : PriorityLevel = NoWork;
Expand Down

0 comments on commit 8d3635a

Please sign in to comment.