|
Implement Blob.close().
This adds support for the close() methods to Blobs,
http://dev.w3.org/2006/webapi/FileAPI/#close-method
providing a way to explicitly release the underlying data of a Blob.
Subsequent uses of a closed Blob is required/assumed to have the
following behavior:
- the size of a closed Blob should be zero.
- Consumers of such a Blob should treat it as having
size 0 (e.g., FormData.append(), XHR.send()), and not throw.
- FileReader read operations that are underway on a Blob
being close()d should not be impacted.
- Subsequent FileReader read operations on a closed Blob
should fail with InvalidStateError.
- Slices of a closed Blob should still be usable.
- Dereferencing a blob URL that has been closed should
cause a network error, like a revoke.
In other words, closing a shared object is not a straightforward
matter.
R=kinuko@chromium.org,michaeln@chromium.org, jochen@chromium.org
BUG= 157794
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167874
Total comments: 17
Total comments: 8
Total comments: 12
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+487 lines, -36 lines) |
Patch |
|
A |
LayoutTests/fast/files/blob-close.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/files/blob-close-expected.txt
|
View
|
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/files/blob-close-read.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+95 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/files/blob-close-read-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/files/blob-close-revoke.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+123 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/files/blob-close-revoke-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-async.html
|
View
|
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-sync.html
|
View
|
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-tests.js
|
View
|
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-formdata.html
|
View
|
|
4 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/post-formdata-expected.txt
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/DOMURL.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/DOMURL.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+11 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/Blob.h
|
View
|
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/Blob.cpp
|
View
|
1
2
3
4
|
5 chunks |
+26 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/Blob.idl
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/File.h
|
View
|
1
2
3
4
|
5 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/File.cpp
|
View
|
1
2
3
4
|
4 chunks |
+18 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/fileapi/FileReader.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/fileapi/FileReader.cpp
|
View
|
1
2
3
4
5
6
|
2 chunks |
+13 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/html/PublicURLManager.h
|
View
|
|
2 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/html/PublicURLManager.cpp
|
View
|
1
2
3
4
|
4 chunks |
+28 lines, -5 lines |
0 comments
|
Download
|
|
M |
Source/platform/RuntimeEnabledFeatures.in
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 43 (0 generated)
|