Deprecate MozBlobBuilder

RESOLVED FIXED in mozilla14

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: emk, Assigned: emk)

Tracking

({addon-compat, dev-doc-complete})

Trunk
mozilla14
addon-compat, dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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)

Comment 2

5 years ago
Created attachment 606941 [details] [diff] [review]
Warn use of MozBlobBuilder
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #606941 - Flags: review?(jonas)
Attachment #606941 - Flags: review?(jonas) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/5b2e4538f43e
Keywords: checkin-needed
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/5b2e4538f43e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 5

5 years ago
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?
(Assignee)

Comment 6

5 years ago
Please file a bug and block this bug and CC me.

Updated

5 years ago
Depends on: 738966
(Assignee)

Updated

5 years ago
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?
(Assignee)

Comment 8

5 years ago
No, MozBlobBuilder is not (and will never be) unprefixed. Instead it will be removed.

Comment 9

5 years ago
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 ?
(Assignee)

Comment 10

5 years ago
Because Blob constructor doesn't support getFile() equivalent function.

Comment 11

5 years ago
(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 ?
(Assignee)

Updated

5 years ago
Depends on: 742941
(Assignee)

Comment 12

5 years ago
Filed bug 736687.
(Assignee)

Comment 13

5 years ago
Sorry, bug 742941.

Comment 14

5 years ago
thanks!
Documentation updated:

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

Listed on Firefox 14 for developers.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.