Using the source sidebar to generate source from a page not on bclary.com fails on the trunk. steps to reproduce: 1. install <http://bclary.com/log/2004/04/10/user.xpi> to turn on user_pref("signed.applets.codebase_principal_support", true); 2. install the sidebar. 3. visit cnn.com 4. select the source sidebar 5. click generate source Expected results: open window and display pseudo-source for the cnn.com page. Actual results: open window displays blank page and no error is reported. Execution halts in init() at elm.appendChild(doc.createTextNode('Generated Source for ' + content.location)); I'm guessing DOM here. mrbkap has a patch already.
Created attachment 279142 [details] [diff] [review] Fix There were two problems here: - JSTYPE_VOID is apparently equivalent to JSTYPE_STRING in convert hooks, who knew?! - We were failing to throw an exception in the cross-origin case, leading to abrupt termination of the script with no exception or error in the console.
(In reply to comment #1) > - JSTYPE_VOID is apparently equivalent to JSTYPE_STRING in convert hooks, who > knew?! Uh, they're enums with different values according to jspubtd.h. What's going on here?
Now that I look again, I realize that JSTYPE_VOID is meant as a generic "convert me to a primitive" conversion. For most objects, this means "strings," but for objects representing numbers, you might want to return a number. See also http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp&rev=1.71&root=/cvsroot&mark=562,563#528 (note the mark's a little ways down).
Comment on attachment 279142 [details] [diff] [review] Fix Yeah, VOID means "default" which is usually STRING. /be
Fixed on trunk.