Closed Bug 205768 Opened 21 years ago Closed 13 years ago

Enumeration of wrapped IDispatch objects is broken

Categories

(Core :: XPConnect, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID
mozilla1.5alpha

People

(Reporter: dbradley, Unassigned)

References

Details

Attachments

(2 obsolete files)

I don't believe this affects any sites nor does it cause a crash, but
enumeration of the properties on an IDispatch wrapper is broken. Only
QueryInterface shows up. And ideally I don't think that should show up anyway.
Will post a patch.

What I realized is that I was avoiding the effort to creating a scriptable
helper when I really should have embraced it. Using the scriptable helper allows
removal of injections of XPC_IDISPATCH_SUPPORT code into enumeration and
resolving, making things a little cleaner in the base XPConnect code.
Status: NEW → ASSIGNED
Attached patch Use nsIXPCScriptable (obsolete) — Splinter Review
Preliminary patch. Just wanted to get it recorded so others could look and
point otu any glaring errors when they have time.
To 1.5a
Target Milestone: --- → mozilla1.5alpha
Slight mod to the previous patch. The previous patch was returning undefined
the first time retrieving a property, because it wasn't returning the object
out of the NewResolve handler.
Attachment #123372 - Attachment is obsolete: true
Comment on attachment 123465 [details] [diff] [review]
Fixes resolve returning no object

Looking for reviews. 

This utilizes the existing scriptable helper framework to do the enumeration
and resolving.	That in turn allowed me to clean things up and consolidate the
behavior.
Attachment #123465 - Flags: superreview?(alecf)
Attachment #123465 - Flags: review?(adamlock)
Comment on attachment 123465 [details] [diff] [review]
Fixes resolve returning no object

r=adamlock

Is it okay to return NS_OK when the pointers in NewResolve are null?
Attachment #123465 - Flags: review?(adamlock) → review+
I was following patterns from elsewhere. Hopefully I'm not perpetuating bad
habits. I believe the idea is that the return value is going to be false in
those cases, signaling to JS that it couldn't be resolved. Which will return an
error if nothing else can resolve it.
Comment on attachment 123465 [details] [diff] [review]
Fixes resolve returning no object

sr=alecf
Attachment #123465 - Flags: superreview?(alecf) → superreview+
Patch checked into trunk.
I'm going to leave this open till it gets checked into the 1.4 branch. Will ask
for a= after Mozilla releases.
Closing to get off 1.5a radar, though these should still be checked into 1.4 branch.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Blocks: 212096
Rubber-stamp vrfy
Status: RESOLVED → VERIFIED
Comment on attachment 123465 [details] [diff] [review]
Fixes resolve returning no object

If you're trying to get something checked into the 1.4 branch, please use the
approval1.4.2? flag. That's the only way drivers@mozilla.org know a fixed bug
still needs to land somewhere. Knowing about the regression in bug 226380 and
that this didn't fix any know crashes or websites, should we still be
considering it for the 1.4 branch - should we be considering backing it out to
fix 226380
Attachment #123465 - Flags: approval1.4.2?
Reopening to back out.

Are we looking only to back this out of 1.4.2 or 1.6 as well. Sorry I've not
been keeping up with the release schedule.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Comment on attachment 123465 [details] [diff] [review]
Fixes resolve returning no object

This is not a good 1.4.2 candidate based on the regression.
Attachment #123465 - Flags: approval1.4.2? → approval1.4.2-
Assignee: dbradley → nobody
Status: REOPENED → NEW
QA Contact: pschwartau → xpconnect
Attachment #123465 - Attachment is obsolete: true
The IDispatch API was removed in bug 662000.

-> INVALID

[Filter bugspam on idispatchinvalid]
Status: NEW → RESOLVED
Closed: 21 years ago13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: