Skip to content

Commit 16991f7

Browse files
committed
Remove Stack-only code in ReactGenericBatching
1 parent e854aa2 commit 16991f7

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/renderers/shared/shared/event/ReactGenericBatching.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,22 @@
1111

1212
var ReactControlledComponent = require('ReactControlledComponent');
1313

14-
// Used as a way to call batchedUpdates when we don't know if we're in a Fiber
15-
// or Stack context. Such as when we're dispatching events or if third party
14+
// Used as a way to call batchedUpdates when we don't have a reference to
15+
// the renderer. Such as when we're dispatching events or if third party
1616
// libraries need to call batchedUpdates. Eventually, this API will go away when
1717
// everything is batched by default. We'll then have a similar API to opt-out of
1818
// scheduled work and instead do synchronous work.
1919

2020
// Defaults
21-
var stackBatchedUpdates = function(fn, a, b, c, d, e) {
22-
return fn(a, b, c, d, e);
23-
};
2421
var fiberBatchedUpdates = function(fn, bookkeeping) {
2522
return fn(bookkeeping);
2623
};
2724

28-
function performFiberBatchedUpdates(fn, bookkeeping) {
25+
function batchedUpdates(fn, bookkeeping) {
2926
// If we have Fiber loaded, we need to wrap this in a batching call so that
3027
// Fiber can apply its default priority for this call.
3128
return fiberBatchedUpdates(fn, bookkeeping);
3229
}
33-
function batchedUpdates(fn, bookkeeping) {
34-
// We first perform work with the stack batching strategy, by passing our
35-
// indirection to it.
36-
return stackBatchedUpdates(performFiberBatchedUpdates, fn, bookkeeping);
37-
}
3830

3931
var isNestingBatched = false;
4032
function batchedUpdatesWithControlledComponents(fn, bookkeeping) {
@@ -58,9 +50,6 @@ function batchedUpdatesWithControlledComponents(fn, bookkeeping) {
5850
}
5951

6052
var ReactGenericBatchingInjection = {
61-
injectStackBatchedUpdates: function(_batchedUpdates) {
62-
stackBatchedUpdates = _batchedUpdates;
63-
},
6453
injectFiberBatchedUpdates: function(_batchedUpdates) {
6554
fiberBatchedUpdates = _batchedUpdates;
6655
},

0 commit comments

Comments
 (0)