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()); |
} |