Closed Bug 875192 Opened 13 years ago Closed 12 years ago

Can't pass Blob to content constructor of WebIDL interface

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: reuben, Unassigned)

Details

Attachments

(1 file)

In Contacts, when I receive a Blob from the parent and try to create a mozContact by calling the content constructor, I get TypeError: Value does not implement interface Blob. I talked to bholley and he thinks this should work.
Steps to reproduce, please (presumably starting with a link to the diff to apply?). I assume there's security wrapper stuff involved, but without knowing exactly what objects are being passed how and to whom it's hard to do anything with this.
Attached patch PatchSplinter Review
Because this needs to come from the parent over IPC, I'll just attach my entire patch. Run ./mach mochitest-plain dom/contacts/tests/test_contacts_blobs.html to reproduce.
Looks like this is just a bug somewhere up the chain; when we get into the message manager in the child we have: (gdb) p aCloneData->mClosure.mBlobs.Length() $19 = 0 and when we're trying to convert something to a blob what we have is: (gdb) p temp.toObject().getClass()->name $22 = 0x101da2173 "Proxy" (gdb) p js::GetProxyHandler(&temp.toObject()) $23 = ('js::CrossCompartmentWrapper' *) 0x10201a600 (gdb) p js::GetProxyPrivate(&temp.toObject()).toObject().getClass()->name $24 = 0x101dd32c5 "Object" which sure isn't a Blob in any way, shape, or form.
Reuben, is this still an issue?
Flags: needinfo?(reuben.bmo)
No, it isn't.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(reuben.bmo)
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: