Closed Bug 884936 Opened 11 years ago Closed 11 years ago

Add Blob/File support to xpcshell

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: janv, Assigned: janv)

References

Details

Attachments

(1 file)

      No description provided.
Blocks: 785884
Blocks: 883614
Attached patch patch v0.1Splinter Review
The existing test for File objects in JS components is buggy. See |=| vs |==|
Assignee: nobody → Jan.Varga
Status: NEW → ASSIGNED
Attachment #764899 - Flags: review?(bent.mozilla)
Comment on attachment 764899 [details] [diff] [review]
patch v0.1

Review of attachment 764899 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with this:

::: content/base/src/nsDOMBlobBuilder.h
@@ +15,5 @@
> +#define NS_DOMMULTIPARTBLOB_CID \
> +{ 0x47bf0b43, 0xf37e, 0x49ef, \
> +  { 0x81, 0xa0, 0x18, 0xba, 0xc0, 0x57, 0xb5, 0xcc } }
> +#define NS_DOMMULTIPARTBLOB_CONTRACTID \
> +"@mozilla.org/dom/multipart-blob;1"

Nit: two space indent here and below for continued lines

::: js/xpconnect/shell/xpcshell.cpp
@@ +828,5 @@
> +
> +  nsCOMPtr<nsISupports> native =
> +    do_CreateInstance("@mozilla.org/dom/multipart-blob;1");
> +  if (!native) {
> +    return false;

Wherever you return false here and below you should first JS_ReportError something useful, otherwise script won't see the exception.

::: layout/build/nsLayoutModule.cpp
@@ +949,5 @@
>    return commandTable->QueryInterface(aIID, aResult);
>  }
>  
> +static nsresult
> +nsDOMMultipartBlobConstructor(nsISupports* aOuter, REFNSIID aIID,

Let's change these to use the MAKE_CTOR macro instead.
Attachment #764899 - Flags: review?(bent.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/a17433f3f2fc
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: