Skip to content

[1.8.2 BLOCKER] #12447#922

Closed
gibson042 wants to merge 3 commits intojquery:masterfrom
gibson042:12447
Closed

[1.8.2 BLOCKER] #12447#922
gibson042 wants to merge 3 commits intojquery:masterfrom
gibson042:12447

Conversation

@gibson042
Copy link
Member

No new test because I'm not really sure how to identify potentially nonterminating inputs.

Sizes - compared to master @ 6bc2a87

    259990        (+8)  dist/jquery.js                                         
     92802        (+7)  dist/jquery.min.js                                     
     33216        (-1)  dist/jquery.min.js.gz

src/effects.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

0.0001 seems like a magic number here. Can we be certain that this condition gets met?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is a magic number, and... no. The choice of how good a fit to demand while protecting ourselves against nontrivial loops is arbitrary.

Copy link
Member

Choose a reason for hiding this comment

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

My only other thought is that we might want to put in an iteration counter as a failsafe? Also arbitrary, but guaranteed to terminate.

Copy link
Member

Choose a reason for hiding this comment

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

How many iterations would you make through here, and would the starting value get a lot better after dozens of iterations? If the infinite loop is the exception then a small failsafe loop counter might be easier to deal with and a heck of a lot less mysterious.

@dmethvin dmethvin closed this in e755c19 Sep 15, 2012
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants