зеркало из https://github.com/mozilla/pjs.git
00f42f97a9
Note that there is one key difference between this implementation and the spec. In this patch mozBlobBuilder.getBlob("content/type"); returns a Blob and clears the mozBlobBuilder. In the spec the BlobBuilder is not cleared. Thus, let bb = new mozBlobBuilder(); mozBlobBuilder.append("foo"); let blob1 = mozBlobBuilder.getBlob("content/type"); // blob1 contains "foo" mozBlobBuilder.append("bar"); let blob2 = mozBlobBuilder.getBlob("content/type"); // blob2 contains "bar", the spec says it should contain "foobar". IMO, the spec behavior optimizes for the wrong case. BlobBuilder will probably be used mostly as a one-shot API. Additionally, the spec requires the BlobBuilder to hang on to potentially large amounts of memory between the getBlob() call and when the BlobBuilder is GCd. These issues have been raised on the listserv. |
||
---|---|---|
.. | ||
base | ||
indexedDB | ||
interfaces | ||
ipc | ||
locales | ||
plugins | ||
public/coreEvents | ||
src | ||
system | ||
tests | ||
Makefile.in | ||
dom-config.mk |