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

Unified Diff: Source/core/dom/DOMURL.cpp

Issue 184473002: Sync Blob.close() behavior wrt updated spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased 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
« no previous file with comments | « Source/core/dom/DOMURL.h ('k') | Source/core/dom/URL.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMURL.cpp
diff --git a/Source/core/dom/DOMURL.cpp b/Source/core/dom/DOMURL.cpp
index 9aa3764185a39971b79b481a9db0f0bc8492a4aa..feba9b94942173c044ff9ce77be4eed4920b3582 100644
--- a/Source/core/dom/DOMURL.cpp
+++ b/Source/core/dom/DOMURL.cpp
@@ -63,10 +63,14 @@ void DOMURL::setInput(const String& value)
}
}
-String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob)
+String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, ExceptionState& exceptionState)
{
if (!executionContext || !blob)
return String();
+ if (blob->hasBeenClosed()) {
+ exceptionState.throwDOMException(InvalidStateError, String(blob->isFile() ? "File" : "Blob") + " has been closed.");
+ return String();
+ }
return createPublicURL(executionContext, blob, blob->uuid());
}
« no previous file with comments | « Source/core/dom/DOMURL.h ('k') | Source/core/dom/URL.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698