Skip to content

Commit

Permalink
Enable MessageLoop implementation by default (#16408)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Sep 5, 2019
1 parent d96f478 commit 040ca0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/scheduler/src/SchedulerFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export const enableSchedulerDebugging = false;
export const enableIsInputPending = false;
export const requestIdleCallbackBeforeFirstFrame = false;
export const requestTimerEventBeforeFirstFrame = false;
export const enableMessageLoopImplementation = false;
export const enableMessageLoopImplementation = true;
export const enableProfiling = __PROFILE__;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ type FrameTimeoutConfigType = {
timePastFrameDeadline: ?number,
};

describe('SchedulerDOM', () => {
// Note: this is testing the implementation that we turned off.
// enableMessageLoopImplementation is true on master.
describe('SchedulerRAFOld', () => {
let rAFCallbacks = [];
let postMessageCallback;
let postMessageEvents = [];
Expand Down Expand Up @@ -101,6 +103,7 @@ describe('SchedulerDOM', () => {
),
);

require('scheduler/src/SchedulerFeatureFlags').enableMessageLoopImplementation = false;
Scheduler = require('scheduler');
});

Expand Down
6 changes: 3 additions & 3 deletions packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
export const {
enableIsInputPending,
enableSchedulerDebugging,
requestIdleCallbackBeforeFirstFrame,
requestTimerEventBeforeFirstFrame,
enableMessageLoopImplementation,
} = require('SchedulerFeatureFlags');

export const enableProfiling = __PROFILE__;
export const requestIdleCallbackBeforeFirstFrame = false;
export const requestTimerEventBeforeFirstFrame = false;
export const enableMessageLoopImplementation = true;

0 comments on commit 040ca0f

Please sign in to comment.