Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix risk condition on loading indicator when layout completes before vsync. #1043

Merged
merged 2 commits into from
Dec 1, 2015

Conversation

dvoytenko
Copy link
Contributor

No description provided.

@@ -1002,6 +1002,28 @@ describe('CustomElement Loading Indicator', () => {
expect(toggle.firstCall.args[1]).to.equal(true);
});
});

it('should ignore loading on if layout completed before vsync', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's loading "on" :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -305,6 +305,9 @@ export function createAmpElementProto(win, name, implementationClass) {
/** @private {boolean|undefined} */
this.loadingDisabled_;

/** @private {boolean|undefined} */
this.loadingState_;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to to start with a boolean state? like false by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be stripped out by a compiler.

@erwinmombay
Copy link
Member

LGTM.

@dvoytenko dvoytenko added the LGTM label Dec 1, 2015
dvoytenko added a commit that referenced this pull request Dec 1, 2015
Fix risk condition on loading indicator when layout completes before vsync.
@dvoytenko dvoytenko merged commit 530f313 into ampproject:master Dec 1, 2015
@dvoytenko dvoytenko deleted the progress-fix1 branch December 1, 2015 21:45
@henel677 henel677 mentioned this pull request Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants