Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup after #8353 #8403

Merged
merged 1 commit into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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