If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

halt script execution and fail to report error

RESOLVED FIXED

Status

()

Core
XPConnect
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: bc, Assigned: mrbkap)

Tracking

({regression})

Trunk
x86
All
regression
Points:
---
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
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)

Updated

10 years ago
Assignee: mrbkap → nobody
Component: DOM → XPConnect
QA Contact: general → xpconnect
(Assignee)

Updated

10 years ago
Assignee: nobody → mrbkap
(Assignee)

Comment 1

10 years ago
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.
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?
(Assignee)

Comment 3

10 years ago
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?

Updated

10 years ago
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+
(Assignee)

Updated

10 years ago
Attachment #279142 - Flags: approval1.9?

Updated

10 years ago
Attachment #279142 - Flags: approval1.9? → approval1.9+

Updated

10 years ago
Flags: blocking1.9? → blocking1.9+
(Assignee)

Comment 5

10 years ago
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.