Closed Bug 231231 Opened 20 years ago Closed 20 years ago

next item should be get before the callback is called in moz_container_forall

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: iamawalrus, Assigned: iamawalrus)

References

Details

Attachments

(1 file)

in moz_container_forall,
    while (tmp_list) {
        MozContainerChild *child;
        child = tmp_list->data;
        (* callback) (child->widget, callback_data);
        tmp_list = tmp_list->next;
    }
the next item is get after the callback is called. This will cause problems when
the callback is gtk_widget_destroy, the current list item is freed in
moz_container_remove and the tmp_list->next will be a random pointer.
Attached patch patchSplinter Review
Attachment #139262 - Flags: review?(blizzard)
Comment on attachment 139262 [details] [diff] [review]
patch

Good catch.
Attachment #139262 - Flags: review?(blizzard) → review+
Attachment #139262 - Flags: superreview?(bryner)
Attachment #139262 - Flags: superreview?(bryner) → superreview+
checked in.
Thank you all!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.