Closed Bug 736687 Opened 8 years ago Closed 8 years ago

Deprecate MozBlobBuilder

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: emk, Assigned: emk)

References

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(1 file)

Blob constructor was proposed as a replacement of BlobBuilder.
Yeah. I think for now we should just add a warning whenever BlobBuilder is used. Eventually we should be able to remove it.
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #606941 - Flags: review?(jonas)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5b2e4538f43e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
I saw this deprecation warning so I tried to use the Blob constructor, but I get this error:

  new Blob([new ArrayBuffer(10)])

  [10:37:43.420] [Exception... "An attempt was made to use an object that is not, or is no longer, usable"  code: "11" nsresult: "0x8053000b (InvalidStateError)"  location: "Web Console Line: 1"]

Should I file a bug, or is the Blob constructor not ready for use yet?
Please file a bug and block this bug and CC me.
Depends on: 738966
No longer depends on: 738966
RE dev-doc-needed:
https://developer.mozilla.org/en/Document_Object_Model_%28DOM%29/BlobBuilder still says "As MozBlobBuilder" for Firefox

I imagine we need to add a line there with "14.0 (14.0) As BlobBuilder" or something?
No, MozBlobBuilder is not (and will never be) unprefixed. Instead it will be removed.
Comment on attachment 606941 [details] [diff] [review]
Warn use of MozBlobBuilder

>diff --git a/dom/indexedDB/test/test_file_cross_database_copying.html b/dom/indexedDB/test/test_file_cross_database_copying.html
>--- a/dom/indexedDB/test/test_file_cross_database_copying.html
>+++ b/dom/indexedDB/test/test_file_cross_database_copying.html
>@@ -56,19 +56,16 @@
>       let result = event.target.result;
>       verifyBlob(result, fileData.file, 1);
>       yield;
> 
>       if (!refResult) {
>         refResult = result;
>         continue;
>       }
>-
>-      netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
>-      isnot(result.mozFullPath, refResult.mozFullPath, "Different os files");

why did you remove that ?
Because Blob constructor doesn't support getFile() equivalent function.
(In reply to Masatoshi Kimura [:emk] from comment #10)
> Because Blob constructor doesn't support getFile() equivalent function.

The automatic test is now almost useless (w/o that check)

I see that getFile() in file.js now returns only blobs, so files (nsIDOMFile) are not tested at all, I mean they are not tested in entire test suite.

There must be a way to create a File, no ?
Depends on: 742941
Filed bug 736687.
Sorry, bug 742941.
thanks!
Documentation updated:

https://developer.mozilla.org/en/DOM/BlobBuilder

Listed on Firefox 14 for developers.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.