I've created a dialog box that includes JSON. Expected Results: 1. open a dialog 2. no errors Actual results: 1. open a dialog 2. error console says "Error: button.addEventListener is not a function Source file: chrome://global/content/bindings/dialog.xml Line: 224" When a break is put on line 224 of dialog.xml then you'll notice dlgtype has the value toJSONString (the same name as a helper string JSON.js adds). Experianced on: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:188.8.131.52) Gecko/20061201 Firefox/184.108.40.206 (Ubuntu-feisty) This problem is caused by JSON's overriding Object's prototype not a bug in Moz, except in so much as it would be nice to provide a facility to do these kinds of extensions without breaking anything. to use JSON.jsm is the correct solution here.
Fixing this properly basically involves us making the entire Firefox UI safe from extensions manipulating the Object prototype. Might be nice at some point but I think the appropriate solution at this stage is just to discourage extension authors from doing such things, I've certainly discouraged them whenever I've heard of it already.
Should this bug be about making the dialog binding use hasOwnProperty in its for..in loop?