Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: Source/core/fileapi/File.cpp

Issue 157363003: Implement Blob.close(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid warning from PHP's fread() on empty reads Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/fileapi/File.cpp
diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp
index de776d5acfee62729976119c903e6f667c9a3112..ad3ad935b862be53b72d657fa18865ded433fef0 100644
--- a/Source/core/fileapi/File.cpp
+++ b/Source/core/fileapi/File.cpp
@@ -225,6 +225,17 @@ void File::captureSnapshot(long long& snapshotSize, double& snapshotModification
snapshotModificationTime = metadata.modificationTime;
}
+void File::close(ExecutionContext* executionContext)
+{
+ if (!hasBeenClosed()) {
+ m_hasBackingFile = false;
+ m_relativePath = String();
+ m_path = String();
kinuko 2014/02/12 12:52:00 There're more fields in this class (e.g. m_name)--
sof 2014/02/12 12:53:46 The name of the Blob isn't currently spec'ed as go
kinuko 2014/02/12 13:26:25 I see thanks. Could we clear m_fileSystemURL too t
sof 2014/02/12 22:28:26 Yes, better do both.
sof 2014/02/13 09:59:57 Done now.
+ invalidateSnapshotMetadata();
+ Blob::close(executionContext);
+ }
+}
+
void File::appendTo(BlobData& blobData) const
{
if (!m_hasBackingFile) {

Powered by Google App Engine
This is Rietveld 408576698