XP_BZERO(&message_data, sizeof(IL_MessageData));
nsCRT::zero(&message_data, sizeof(IL_MessageData));
il_progress_notify(il_container *ic){    uint percent_done;    static uint last_percent_done = 0;    int row = ic->update_end_row;    IL_MessageData message_data;    IL_ImageReq *image_req;    NI_PixmapHeader *img_header = &ic->image->header;        XP_BZERO(&message_data, sizeof(IL_MessageData));    /* No more progress bars for GIF animations after initial load. */    if (ic->is_looping)        return;    /* Calculate the percentage of image decoded (not displayed) */    if(ic->content_length) {        percent_done =            (uint32)100 * ic->bytes_consumed / ((uint32)ic->content_length);    /* Some protocols, e.g. gopher, don't support content-length, so     * show the percentage of the image displayed instead     */    } else {        /* Could be zero if before il_size() is called. */        if (img_header->height == 0)            return;        int ret;        /* Interlaced GIFs are weird */        if ((ret = nsCRT::strncasecmp(ic->type, "image/gif", 9)) == 0) {            percent_done = il_compute_percentage_complete(row, ic);        }        else        {            /* This isn't correct for progressive JPEGs, but there's             * really nothing we can do about that because the number             * of scans in a progressive JPEG isn't known until the             * whole file has been read.             */            percent_done = (uint)(row * (uint32)100 / img_header->height);        }    }    if (percent_done != last_percent_done) {        PR_ASSERT(ic->clients);        for (image_req = ic->clients; image_req; image_req = image_req->next) {            if (image_req->is_view_image) { /* XXXM12N Eliminate this test? */                message_data.image_instance = image_req;                message_data.percent_progress = percent_done;                                XP_NotifyObservers(image_req->obs_list, IL_PROGRESS,                                   &message_data);            }        }        last_percent_done = percent_done;    }}