bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

XPCWrappedNative::ToString should sometimes yield '[object Foo]'

VERIFIED FIXED in mozilla0.9.2

Status

()

Core
XPConnect
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: John Bandhauer, Assigned: David Bradley)

Tracking

Trunk
mozilla0.9.2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: approved)

Attachments

(3 attachments)

(Reporter)

Description

17 years ago
I'm thinking that in the case where a wrappedNative object has a scriptable 
helper (and thus a custom JSClass name) we should name the default ToString 
function yield '[object Foo]' rather than '[xpconnect wrapped Foo]'. I imagine 
this might give us better backward compatibility for misc. DOM objects. If 
nothing else this might limit confusion.

This is easy to change and I think we should just do it before the next major 
release.
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

17 years ago
Created attachment 38621 [details] [diff] [review]
One liner to change the text of toString
(Assignee)

Comment 2

17 years ago
Needs sr/r
Keywords: review
(Assignee)

Comment 3

17 years ago
Created attachment 38720 [details] [diff] [review]
Changed to only return object ToString for only wrapped natives with class info
(Assignee)

Comment 4

17 years ago
Third times a charm. Here's the "final" patch. It tests based on the scriptable 
info, not the class info.
(Assignee)

Comment 5

17 years ago
Created attachment 38721 [details] [diff] [review]
Changes ToString to print object from xpconnect wrapped native
sr=jst for the last patch.

Comment 7

17 years ago
r=beard
a=dbaron for trunk checkin (on behalf of drivers)
(Assignee)

Updated

17 years ago
Keywords: review
Target Milestone: --- → mozilla0.9.2
(Assignee)

Updated

17 years ago
Whiteboard: aproved
(Assignee)

Updated

17 years ago
Whiteboard: aproved → approved

Comment 9

17 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 10

17 years ago
Marking Verified - 
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.