Last Comment Bug 736687 - Deprecate MozBlobBuilder
: Deprecate MozBlobBuilder
: addon-compat, dev-doc-complete
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla14
Assigned To: Masatoshi Kimura [:emk]
: Andrew Overholt [:overholt]
Depends on: 742941
Blocks: 721569
  Show dependency treegraph
Reported: 2012-03-16 19:04 PDT by Masatoshi Kimura [:emk]
Modified: 2012-05-07 09:39 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Warn use of MozBlobBuilder (15.03 KB, patch)
2012-03-17 22:52 PDT, Masatoshi Kimura [:emk]
jonas: review+
Details | Diff | Splinter Review

Description User image Masatoshi Kimura [:emk] 2012-03-16 19:04:47 PDT
Blob constructor was proposed as a replacement of BlobBuilder.
Comment 1 User image Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-03-16 19:29:02 PDT
Yeah. I think for now we should just add a warning whenever BlobBuilder is used. Eventually we should be able to remove it.
Comment 2 User image Masatoshi Kimura [:emk] 2012-03-17 22:52:53 PDT
Created attachment 606941 [details] [diff] [review]
Warn use of MozBlobBuilder
Comment 4 User image Matt Brubeck (:mbrubeck) 2012-03-19 10:23:20 PDT
Comment 5 User image Alon Zakai (:azakai) 2012-03-24 10:39:17 PDT
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?
Comment 6 User image Masatoshi Kimura [:emk] 2012-03-24 11:54:31 PDT
Please file a bug and block this bug and CC me.
Comment 7 User image Daniel Holbert [:dholbert] 2012-03-28 16:50:01 PDT
RE dev-doc-needed: still says "As MozBlobBuilder" for Firefox

I imagine we need to add a line there with "14.0 (14.0) As BlobBuilder" or something?
Comment 8 User image Masatoshi Kimura [:emk] 2012-03-29 07:38:22 PDT
No, MozBlobBuilder is not (and will never be) unprefixed. Instead it will be removed.
Comment 9 User image Jan Varga [:janv] 2012-04-05 03:04:54 PDT
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 =;
>       verifyBlob(result, fileData.file, 1);
>       yield;
>       if (!refResult) {
>         refResult = result;
>         continue;
>       }
>-      isnot(result.mozFullPath, refResult.mozFullPath, "Different os files");

why did you remove that ?
Comment 10 User image Masatoshi Kimura [:emk] 2012-04-05 05:58:51 PDT
Because Blob constructor doesn't support getFile() equivalent function.
Comment 11 User image Jan Varga [:janv] 2012-04-05 06:39:50 PDT
(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 ?
Comment 12 User image Masatoshi Kimura [:emk] 2012-04-05 14:06:36 PDT
Filed bug 736687.
Comment 13 User image Masatoshi Kimura [:emk] 2012-04-05 14:07:07 PDT
Sorry, bug 742941.
Comment 14 User image Jan Varga [:janv] 2012-04-05 14:17:22 PDT
Comment 15 User image Eric Shepherd [:sheppy] 2012-05-07 09:39:52 PDT
Documentation updated:

Listed on Firefox 14 for developers.

Note You need to log in before you can comment on or make changes to this bug.