Closed
Bug 517176
Opened 15 years ago
Closed 15 years ago
Switching away from the Get Add-ons pane while it is loading thumbnails causes multiple getElementById errors
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: mossop, Assigned: mossop)
Details
Attachments
(1 file, 1 obsolete file)
1.15 KB,
patch
|
robert.strong.bugs
:
review+
benjamin
:
approval1.9.2+
|
Details | Diff | Splinter Review |
The Get Add-ons pane does some background loading of thumbnails for the results so it knows how big to size them in the UI. If you switch away from the pane before the load is complete then the listener monitoring it throws some errors like:
Error: document.getElementById(id) is null
Source File: chrome://mozapps/content/extensions/extensions.xml
Line: 415
Patch is pretty simple, just check the element is still in the document.
Attachment #401179 -
Flags: review?(robert.bugzilla)
![]() |
||
Comment 1•15 years ago
|
||
Comment on attachment 401179 [details] [diff] [review]
patch rev 1
>diff --git a/toolkit/mozapps/extensions/content/extensions.xml b/toolkit/mozapps/extensions/content/extensions.xml
>--- a/toolkit/mozapps/extensions/content/extensions.xml
>+++ b/toolkit/mozapps/extensions/content/extensions.xml
>@@ -451,20 +451,26 @@
> if (this.hasAttribute("thumbwidth")) {
> this._displayImage();
> return;
> }
>
> var image = new Image();
> var id = this.id;
> image.onload = function() {
>- document.getElementById(id)._imageLoaded(image);
>+ var self = document.getElementById(id);
>+ // This element might have gone away in the meantime
>+ if (self)
>+ self._imageLoaded(image);
> };
> image.onerror = function() {
>- document.getElementById(id)._hideImage();
>+ var self = document.getElementById(id);
>+ // This element might have gone away in the meantime
>+ if (self)
>+ self.._hideImage();
Should probably fix this ^
Attachment #401179 -
Flags: review?(robert.bugzilla) → review-
Assignee | ||
Comment 2•15 years ago
|
||
Yeah let's try that again.
Attachment #401179 -
Attachment is obsolete: true
Attachment #401195 -
Flags: review?(robert.bugzilla)
![]() |
||
Updated•15 years ago
|
Attachment #401195 -
Flags: review?(robert.bugzilla) → review+
Assignee | ||
Comment 3•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs baking]
Assignee | ||
Comment 4•15 years ago
|
||
Comment on attachment 401195 [details] [diff] [review]
patch rev 2
This is a simple patch that cleans up a few errors in the error console, no risk.
Attachment #401195 -
Flags: approval1.9.2?
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs baking]
Updated•15 years ago
|
Attachment #401195 -
Flags: approval1.9.2? → approval1.9.2+
Assignee | ||
Comment 5•15 years ago
|
||
Landed on branch: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/dc5b45bbdafc
status1.9.2:
--- → beta1-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•