Closed
Bug 616785
Opened 14 years ago
Closed 14 years ago
PageMod throws exception when XML document element inserted
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
1.0b1
People
(Reporter: myk, Assigned: myk)
References
Details
(Whiteboard: [cherry-pick-1.0b1])
Attachments
(1 file)
621 bytes,
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
PageMod objects throw an exception when the document element for an XML document (like autocomplete.xml, which loads when the awesomebar is activated for the first time) is inserted, since they assume that documents have windows, and XML documents don't have windows:
error: An exception occurred.
Traceback (most recent call last):
File "chrome://global/content/bindings/autocomplete.xml", line 1096, in
document.getAnonymousElementByAttribute(this, "anonid", "richlistbox");
File "resource://anonid0-foo-api-utils-lib/observer-service.js", line 174, in
this.callback(subject, data);
File "resource://anonid0-foo-addon-kit-lib/page-mod.js", line 185, in _onContentWindow
if (RULES[rule].test(window.document.URL))
TypeError: window is null
Here's a simple fix that ignores documents without windows. At some point we might consider adding support for XML documents, but this at least cleans up the console.
Attachment #495338 -
Flags: review?(adw)
Comment 1•14 years ago
|
||
Comment on attachment 495338 [details] [diff] [review]
patch v1: fixes problem
r+, let's land it, but Irakli already had a patch for this in bug 610624.
Attachment #495338 -
Flags: review?(adw) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [cherry-pick-wanted]
Target Milestone: -- → 1.0b2
Assignee | ||
Comment 4•14 years ago
|
||
Whiteboard: [cherry-pick-wanted] → [cherry-pick-1.0b1]
Target Milestone: 1.0b2 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•