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

VERIFIED FIXED in mozilla0.9.2

Status

()

VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: jband_mozilla, Assigned: dbradley)

Tracking

Trunk
mozilla0.9.2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: approved)

Attachments

(3 attachments)

(Reporter)

Description

18 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

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

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

Comment 2

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

Comment 3

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

Comment 4

18 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

18 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

18 years ago
r=beard
(Assignee)

Updated

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

Updated

18 years ago
Whiteboard: aproved
(Assignee)

Updated

18 years ago
Whiteboard: aproved → approved

Comment 9

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

Comment 10

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