Skip to content

Commit

Permalink
doPass is an overloaded method name in resources-impl.js. Rename on…
Browse files Browse the repository at this point in the history
…e of them to `doWork`. (#24622)
  • Loading branch information
lannka authored Sep 20, 2019
1 parent aa96607 commit 47e1146
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/service/resources-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1906,7 +1906,7 @@ export class ResourcesImpl {
PAUSED: paused,
INACTIVE: inactive,
} = VisibilityState;
const doPass = () => {
const doWork = () => {
// If viewport size is 0, the manager will wait for the resize event.
const viewportSize = this.viewport_.getSize();
if (viewportSize.height > 0 && viewportSize.width > 0) {
Expand Down Expand Up @@ -1944,32 +1944,32 @@ export class ResourcesImpl {
};
const resume = () => {
this.resources_.forEach(r => r.resume());
doPass();
doWork();
};

vsm.addTransition(prerender, prerender, doPass);
vsm.addTransition(prerender, visible, doPass);
vsm.addTransition(prerender, hidden, doPass);
vsm.addTransition(prerender, inactive, doPass);
vsm.addTransition(prerender, paused, doPass);
vsm.addTransition(prerender, prerender, doWork);
vsm.addTransition(prerender, visible, doWork);
vsm.addTransition(prerender, hidden, doWork);
vsm.addTransition(prerender, inactive, doWork);
vsm.addTransition(prerender, paused, doWork);

vsm.addTransition(visible, visible, doPass);
vsm.addTransition(visible, hidden, doPass);
vsm.addTransition(visible, visible, doWork);
vsm.addTransition(visible, hidden, doWork);
vsm.addTransition(visible, inactive, unload);
vsm.addTransition(visible, paused, pause);

vsm.addTransition(hidden, visible, doPass);
vsm.addTransition(hidden, hidden, doPass);
vsm.addTransition(hidden, visible, doWork);
vsm.addTransition(hidden, hidden, doWork);
vsm.addTransition(hidden, inactive, unload);
vsm.addTransition(hidden, paused, pause);

vsm.addTransition(inactive, visible, resume);
vsm.addTransition(inactive, hidden, resume);
vsm.addTransition(inactive, inactive, noop);
vsm.addTransition(inactive, paused, doPass);
vsm.addTransition(inactive, paused, doWork);

vsm.addTransition(paused, visible, resume);
vsm.addTransition(paused, hidden, doPass);
vsm.addTransition(paused, hidden, doWork);
vsm.addTransition(paused, inactive, unload);
vsm.addTransition(paused, paused, noop);
}
Expand Down

0 comments on commit 47e1146

Please sign in to comment.