Last Comment Bug 736687 - Deprecate MozBlobBuilder
: Deprecate MozBlobBuilder
Status: RESOLVED FIXED
: 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]
:
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


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

Description Masatoshi Kimura [:emk] 2012-03-16 19:04:47 PDT
Blob constructor was proposed as a replacement of BlobBuilder.
Comment 1 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 Masatoshi Kimura [:emk] 2012-03-17 22:52:53 PDT
Created attachment 606941 [details] [diff] [review]
Warn use of MozBlobBuilder
Comment 4 Matt Brubeck (:mbrubeck) 2012-03-19 10:23:20 PDT
https://hg.mozilla.org/mozilla-central/rev/5b2e4538f43e
Comment 5 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 Masatoshi Kimura [:emk] 2012-03-24 11:54:31 PDT
Please file a bug and block this bug and CC me.
Comment 7 Daniel Holbert [:dholbert] 2012-03-28 16:50:01 PDT
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?
Comment 8 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 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 = 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 ?
Comment 10 Masatoshi Kimura [:emk] 2012-04-05 05:58:51 PDT
Because Blob constructor doesn't support getFile() equivalent function.
Comment 11 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 Masatoshi Kimura [:emk] 2012-04-05 14:06:36 PDT
Filed bug 736687.
Comment 13 Masatoshi Kimura [:emk] 2012-04-05 14:07:07 PDT
Sorry, bug 742941.
Comment 14 Jan Varga [:janv] 2012-04-05 14:17:22 PDT
thanks!
Comment 15 Eric Shepherd [:sheppy] 2012-05-07 09:39:52 PDT
Documentation updated:

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

Listed on Firefox 14 for developers.

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