| Index: Source/core/fileapi/File.cpp
|
| diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp
|
| index a7d1d80359339c3866edd8099b67c00f7eca0857..5963b41e9e0dd56ca90d5785ea5bffcef8e1e0e9 100644
|
| --- a/Source/core/fileapi/File.cpp
|
| +++ b/Source/core/fileapi/File.cpp
|
| @@ -216,7 +216,7 @@ unsigned long long File::size() const
|
| return static_cast<unsigned long long>(size);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<Blob> File::slice(long long start, long long end, const String& contentType, ExceptionState& exceptionState) const
|
| +PassRefPtrWillBeRawPtr<Blob> File::slice(long long start, Optional<long long> optionalEnd, const String& contentType, ExceptionState& exceptionState) const
|
| {
|
| if (hasBeenClosed()) {
|
| exceptionState.throwDOMException(InvalidStateError, "File has been closed.");
|
| @@ -224,7 +224,9 @@ PassRefPtrWillBeRawPtr<Blob> File::slice(long long start, long long end, const S
|
| }
|
|
|
| if (!m_hasBackingFile)
|
| - return Blob::slice(start, end, contentType, exceptionState);
|
| + return Blob::slice(start, optionalEnd, contentType, exceptionState);
|
| +
|
| + long long end = optionalEnd.isMissing() ? std::numeric_limits<long long>::max() : optionalEnd.get();
|
|
|
| // FIXME: This involves synchronous file operation. We need to figure out how to make it asynchronous.
|
| long long size;
|
|
|