Skip to content

Commit

Permalink
Use priority context when scheduling error boundary work
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite committed Oct 28, 2016
1 parent 8666077 commit 55235cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/renderers/shared/fiber/ReactFiberScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,9 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) {

// We will process an update caused by each error boundary synchronously.
affectedBoundaries.forEach(boundary => {
// FIXME: We only specify LowPriority here so that setState() calls from the error
// boundaries are respected. Instead we should set default priority level or something
// like this. Reconsider this piece when synchronous scheduling is in place.
const priority = LowPriority;
const priority = priorityContext !== null ?
priorityContext :
defaultPriorityContext;
const root = scheduleErrorBoundaryWork(boundary, priority);
// This should use findNextUnitOfWork() when synchronous scheduling is implemented.
let fiber = cloneFiber(root.current, priority);
Expand Down

0 comments on commit 55235cb

Please sign in to comment.