Skip to content
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
1 change: 0 additions & 1 deletion scripts/fiber/tests-failing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ src/renderers/shared/stack/reconciler/__tests__/ReactUpdates-test.js
* should flow updates correctly
* should share reconcile transaction across different roots
* should queue mount-ready handlers across different roots
* should flush updates in the correct order
* should flush updates in the correct order across roots
* should queue updates from during mount
* calls asap callbacks properly
Expand Down
1 change: 1 addition & 0 deletions scripts/fiber/tests-passing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,7 @@ src/renderers/shared/stack/reconciler/__tests__/ReactStatelessComponent-test.js

src/renderers/shared/stack/reconciler/__tests__/ReactUpdates-test.js
* should not reconcile children passed via props
* should flush updates in the correct order
* should queue nested updates
* calls componentWillReceiveProps setState callback properly
* does not update one component twice in a batch (#2410)
Expand Down
16 changes: 2 additions & 14 deletions src/renderers/shared/stack/reconciler/ReactUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,11 @@ var NESTED_UPDATES = {
},
};

var UPDATE_QUEUEING = {
initialize: function() {
this.callbackQueue.reset();
},
close: function() {
this.callbackQueue.notifyAll();
},
};

var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
var TRANSACTION_WRAPPERS = [NESTED_UPDATES];

function ReactUpdatesFlushTransaction() {
this.reinitializeTransaction();
this.dirtyComponentsLength = null;
this.callbackQueue = CallbackQueue.getPooled();
this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
/* useCreateElement */ true
);
Expand All @@ -83,8 +73,6 @@ Object.assign(

destructor: function() {
this.dirtyComponentsLength = null;
CallbackQueue.release(this.callbackQueue);
this.callbackQueue = null;
ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
this.reconcileTransaction = null;
},
Expand Down Expand Up @@ -179,7 +167,7 @@ function runBatchedUpdates(transaction) {

if (callbacks) {
for (var j = 0; j < callbacks.length; j++) {
transaction.callbackQueue.enqueue(
transaction.reconcileTransaction.getReactMountReady().enqueue(
callbacks[j],
component.getPublicInstance()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,19 +634,19 @@ describe('ReactUpdates', () => {
'Inner-setState-1',
'Inner-render-1-1',
'Inner-didUpdate-1-1',
'Inner-callback-1',
'Outer-callback-1',
'Inner-callback-1',
'Outer-callback-1',

'Outer-setState-2',
'Outer-render-2',
'Inner-render-2-1',
'Inner-didUpdate-2-1',
'Outer-didUpdate-2',
'Inner-setState-2',
'Inner-render-2-2',
'Inner-didUpdate-2-2',
'Outer-callback-2',
'Inner-render-2-2',
'Inner-didUpdate-2-2',
'Inner-callback-2',
'Outer-callback-2',
]);
/* eslint-enable indent */
});
Expand Down