I would prefer to remove the comment and return it to the do--while construct as well. It is unclear to me whether do--while is OK or not as a matter of policy. However, the objection to do..while was made on stylistic grounds.Karl


-------- Original Message --------
Subject: Re: [pdf.js] Fixes find functionality recursion (bugzilla FF
bug 960409) (#4131)
From: Rob Wu <notifications@github.com>
Date: Tue, January 28, 2014 10:02 am
To: "mozilla/pdf.js" <pdf.js@noreply.github.com>
Cc: karlden <karld@magrox.co>In web/pdf_find_controller.js: > -        offset.matchIdx = previous ? numMatches - 1 : 0;
> -        this.updateMatch(true);
> -      } else {
> -        // No matches attempt to search the next page.
> -        this.advanceOffsetPage(previous);
> -        if (offset.wrapped) {
> -          offset.matchIdx = null;
> -          if (!this.hadMatch) {
> -            // No point in wrapping there were no matches.
> -            this.updateMatch(false);
> -            return;
> -          }
> -        }
> -        // Search the next page.
> -        this.nextPageMatch();
> +    // done boolean to remove do-while construct per review of PR 4131
 @karlden I have found several uses of this construct in PDF.js, so I wonder who said that do { .. } while ( .. ); is against the code guidelines. If it's a misunderstanding, and do-while is accepted, someone has to remove this comment from the source to avoid further confusion. —Reply to this email directly or view it on GitHub.