Closed Bug 344334 Opened 18 years ago Closed 17 years ago

Adding <xul:preference> and <xul:preferences> to document causes uncatchable "Permission denied to get property UnnamedClass.classes"

Categories

(Core :: XUL, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Assigned: enndeakin)

References

Details

(Keywords: testcase)

Attachments

(2 files)

The testcase triggers
Error: uncaught exception: Permission denied to get property UnnamedClass.classes

Similar to bug 344211.
Attached file testcase
Blocks: 344486
This bug makes it difficult for me to test the <xul:preference> and <xul:preferences> elements.  It would be nice if this were fixed.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #261095 - Flags: review?(mano)
This fixes some exceptions when a preference is used outside of a preferences element.

The permission error is caused because the four fields in the <preference> binding are initialized to services, which can't be used outside of chrome. A preference element isn't actually useful for anything unless permissions allow it, so its arguably correct to just throw a permission error. But maybe we could put some try/catch blocks around the four <field>s in preferences.xml. Thoughts?
Comment on attachment 261095 [details] [diff] [review]
check to ensure parent is a preferences element

Hrm, we still save the actual pref from the preference_s_ binding though, right? If so, I think we should continue to throw here rather than fail silently.

Jesse, what were you trying to test here? these bindings are intentionally not working in content context...
Attachment #261095 - Flags: review?(mano)
Throwing is fine, but throwing an uncatchable exception breaks my testing script.
WFM on trunk, perhaps because of changes to when XBL bits execute.

Neil Deakin, is the patch in comment 3 still desirable?
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: