Skip to content

Commit 8d3635a

Browse files
committed
Cleanup after #8353
1 parent 0c885af commit 8d3635a

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

src/renderers/dom/stack/client/__tests__/ReactDOM-test.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
var React = require('React');
1515
var ReactDOM = require('ReactDOM');
1616
var ReactTestUtils = require('ReactTestUtils');
17-
var div = React.createFactory('div');
1817

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

5554
it('should allow children to be passed as an argument', () => {
5655
var argDiv = ReactTestUtils.renderIntoDocument(
57-
div(null, 'child')
56+
React.DOM.div(null, 'child')
5857
);
5958
var argNode = ReactDOM.findDOMNode(argDiv);
6059
expect(argNode.innerHTML).toBe('child');
6160
});
6261

6362
it('should overwrite props.children with children argument', () => {
6463
var conflictDiv = ReactTestUtils.renderIntoDocument(
65-
div({children: 'fakechild'}, 'child')
64+
React.DOM.div({children: 'fakechild'}, 'child')
6665
);
6766
var conflictNode = ReactDOM.findDOMNode(conflictDiv);
6867
expect(conflictNode.innerHTML).toBe('child');

src/renderers/noop/ReactNoop.js

-11
Original file line numberDiff line numberDiff line change
@@ -157,22 +157,13 @@ var NoopRenderer = ReactFiberReconciler({
157157
},
158158

159159
prepareForCommit() : void {
160-
if (isCommitting) {
161-
throw new Error('Double prepare before commit');
162-
}
163-
isCommitting = true;
164160
},
165161

166162
resetAfterCommit() : void {
167-
if (!isCommitting) {
168-
throw new Error('Double reset after commit');
169-
}
170-
isCommitting = false;
171163
},
172164

173165
});
174166

175-
var isCommitting = false;
176167
var rootContainers = new Map();
177168
var roots = new Map();
178169
var DEFAULT_ROOT_ID = '<default>';
@@ -270,8 +261,6 @@ var ReactNoop = {
270261

271262
syncUpdates: NoopRenderer.syncUpdates,
272263

273-
isCommitting: () => isCommitting,
274-
275264
// Logs the current state of the tree.
276265
dumpTree(rootID : string = DEFAULT_ROOT_ID) {
277266
const root = roots.get(rootID);

src/renderers/shared/fiber/ReactFiberScheduler.js

-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) {
8888
// Need this to prevent recursion while in a Task loop.
8989
let isPerformingTaskWork : boolean = false;
9090

91-
// We'll only prepare/reset on the outermost commit even when a setState
92-
// callback causes another synchronous rerender
93-
let isCommitting : boolean = false;
94-
9591
// The next work in progress fiber that we're currently working on.
9692
let nextUnitOfWork : ?Fiber = null;
9793
let nextPriorityLevel : PriorityLevel = NoWork;

0 commit comments

Comments
 (0)