Closed Bug 553407 Opened 14 years ago Closed 14 years ago

typeof XPCNativeWrapper is now "function"

Categories

(Core :: XPConnect, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: gal)

References

()

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(3 files, 1 obsolete file)

The fix for bug 547314 made any class with a call hook (and no wrappedObject hook) typeof "function". XPCNativeWrapper currently does this, so returns the wrong typeof value.

I can see two ways of fixing this:
  * Change js_TypeOf to somehow exclude XPCNativeWrapper.
  * Split XPCNativeWrapperClass into two classes: withCall and noCall, and use the appropriate one at construction time (if we do this, then this bug should move to XPConnect).
See the URL field for a testcase.
Monkey break monkey fix.
Assignee: general → gal
Component: JavaScript Engine → XPConnect
QA Contact: general → xpconnect
Attached patch patch (obsolete) — Splinter Review
Attached patch patchSplinter Review
Attachment #433452 - Attachment is obsolete: true
Attachment #433457 - Flags: review?(mrbkap)
Comment on attachment 433457 [details] [diff] [review]
patch

Thanks!
Attachment #433457 - Flags: review?(mrbkap) → review+
Attached patch patch with testSplinter Review
http://hg.mozilla.org/tracemonkey/rev/8d9066469059
Whiteboard: fixed-in-tracemonkey
forgot to add the test file:

http://hg.mozilla.org/tracemonkey/rev/178f1770734d
Blocks: 552636
If bug 553597 is in fact a duplicate, can we add a test testing that bug too?
Attachment #435057 - Flags: review?(bzbarsky)
as Bug 552636 blocks 1.9.3, should this too?
http://hg.mozilla.org/mozilla-central/rev/8d9066469059
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 435057 [details] [diff] [review]
Mochitest for that

r=me.  Sorry for the terrible lag here.  :(
Attachment #435057 - Flags: review?(bzbarsky) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: