Closed Bug 394436 Opened 17 years ago Closed 17 years ago

halt script execution and fail to report error

Categories

(Core :: XPConnect, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bc, Assigned: mrbkap)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

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.
Assignee: mrbkap → nobody
Component: DOM → XPConnect
QA Contact: general → xpconnect
Assignee: nobody → mrbkap
Attached patch FixSplinter Review
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.
Attachment #279142 - Flags: superreview?(brendan)
Attachment #279142 - Flags: review?(jst)
(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).
Status: NEW → ASSIGNED
Flags: blocking1.9?
Attachment #279142 - Flags: review?(jst) → review+
Comment on attachment 279142 [details] [diff] [review]
Fix

Yeah, VOID means "default" which is usually STRING.

/be
Attachment #279142 - Flags: superreview?(brendan) → superreview+
Attachment #279142 - Flags: approval1.9?
Attachment #279142 - Flags: approval1.9? → approval1.9+
Flags: blocking1.9? → blocking1.9+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: