Closed Bug 267085 Opened 20 years ago Closed 20 years ago

[FIX]Leaking reflow commands in PresShell::AppendReflowCommand?

Categories

(Core :: Layout, defect, P1)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: rbs, Assigned: bzbarsky)

Details

Attachments

(1 file)

|PresShell::AppendReflowCommand| has an early return when there hasn't been the initial reflow yet. Further down the code, any reflow command that isn't added to the queue is deleted. The question is: why doesn't this apply to the first early return?!? === Another separate thought: how common are reflow commands rejected? If these are too common, maybe the signature of AppendReflowCommand could be changed so that commands are not created just to be deleted immediately. This means doing the creation inside the function itself. Of course, it is not worth the hassle if it is rare.
> The question is: why doesn't this apply to the first early return?!? That's a bug, indeed. > maybe the signature of AppendReflowCommand could be changed I think it's worth doing this anyway.... There's no reason to burden every single caller with having to call NS_NewReflowCommand, check the rv, etc. David, if you don't have any objections, I'll go ahead and do just that.
Attached patch Patch (deleted) — Splinter Review
This moves the reflow command creation into presshell and cleans up a bunch of the code. I went ahead and removed some unused members of the reflow command (some were write-only, and some were always null and never read).
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #171331 - Flags: superreview?(dbaron)
Attachment #171331 - Flags: review?(rbs)
Priority: -- → P1
Summary: Leaking reflow commands in PresShell::AppendReflowCommand? → [FIX]Leaking reflow commands in PresShell::AppendReflowCommand?
Target Milestone: --- → mozilla1.8beta
Comment on attachment 171331 [details] [diff] [review] Patch r=rbs Also update the description of |GetChildListName()|, as what is left there is outdated and makes little sense.
Attachment #171331 - Flags: review?(rbs) → review+
Comment on attachment 171331 [details] [diff] [review] Patch rbs, would you mind doing r+sr? David said that's OK with him.
Attachment #171331 - Flags: superreview?(dbaron) → superreview?(rbs)
Comment on attachment 171331 [details] [diff] [review] Patch sr=rbs
Attachment #171331 - Flags: superreview?(rbs) → superreview+
Fixed. Note that I didn't check in quite the patch attached to this bug, because I had to merge to the prescontext arg removal for Append/Remove/ReplaceChild.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
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

Created:
Updated:
Size: