Closed Bug 69469 Opened 24 years ago Closed 8 years ago

do {} while (PR_FALSE); seems rewritable

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch clean out do while loop (obsolete) — Splinter Review
Attached patch better patchSplinter Review
My only concern here is that it changes the flow of code, using returns instead
of breaks.  The do {} while(PR_FALSE) is being used here as a poor man's
exception routine.  A goto might work just as well if you want to skip ahead in
the case of a failure.

In any case, I'm not sure what the effect of the change in flow will be because
I can't see the surrounding code.  Waterson, layout is your favorite playground.
 Want to have a look?
Why is this better?
> A goto might work just as well if you want to skip ahead in the case of a failure.

Please don't use gotos to skip over code that contains nsCOMPtrs, or other C++
isms. You'll get compiler warnings at best, or crash at worst.
it took me a long time to understand what the while loop's purpose was.  early 
returns otoh are easily understood. [i'll attach a new patch w/ more cleanup]
Keywords: review
Attachment #25685 - Attachment is obsolete: true
timeless, why are you working on bugs that are way past mozilla1.0 in any
conceivable setting of their Target Milestones?  Please help with the crucial stuff.

/be
I misread the year in that date on timeless's last comment -- timeless, please
accept my apologies.  Sorry about that, I have something of a hair trigger
around you on 1.0 non-priorities and I just shot my own foot!

/be
->misc code
Component: Layout → Layout: Misc Code
QA Contact: chrispetersen → layout.misc-code
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: