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

Protect from null pointer exeption and silent failure #12308

Merged
merged 3 commits into from Dec 5, 2017

Conversation

jonkeller
Copy link
Contributor

@jonkeller jonkeller commented Dec 5, 2017

Fixes #12304

@@ -80,6 +80,11 @@ export class VisibilityModel {
`Cannot repeat with interval less than ${MIN_REPEAT_INTERVAL}, ` +
' repeat set to false');
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

revert this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, will do

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

@@ -80,6 +80,11 @@ export class VisibilityModel {
`Cannot repeat with interval less than ${MIN_REPEAT_INTERVAL}, ` +
' repeat set to false');
}
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI going to kill the whole if/else on line 65 next, and make repeat only be allowed to be a boolean, not a number. But probably won't get to that before the canary that's in 2 hours.

Copy link
Contributor

Choose a reason for hiding this comment

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

you might want to keep this PR simple for easy cherry-pick

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

@@ -80,7 +80,6 @@ export class VisibilityModel {
`Cannot repeat with interval less than ${MIN_REPEAT_INTERVAL}, ` +
' repeat set to false');
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@keithwrightbos keithwrightbos merged commit 2b16d73 into ampproject:master Dec 5, 2017
cvializ pushed a commit to cvializ/amphtml that referenced this pull request Dec 5, 2017
* Protect from null pointer exeption and silent failure

* Revert log msg addition

* Replace accidentally removed brace
ghost pushed a commit that referenced this pull request Dec 6, 2017
* Protect from null pointer exeption and silent failure

* Revert log msg addition

* Replace accidentally removed brace
jpettitt pushed a commit to jpettitt/amphtml that referenced this pull request Dec 11, 2017
* Protect from null pointer exeption and silent failure

* Revert log msg addition

* Replace accidentally removed brace
@jonkeller
Copy link
Contributor Author

jonkeller commented Dec 22, 2017 via email

@calebcordry
Copy link
Member

I deleted the comment because I saw that you were one step ahead of me as soon as it was sent :)

gzgogo pushed a commit to gzgogo/amphtml that referenced this pull request Jan 26, 2018
* Protect from null pointer exeption and silent failure

* Revert log msg addition

* Replace accidentally removed brace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants