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

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

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 years, 4 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/fileapi/Blob.h ('k') | Source/core/fileapi/File.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/Blob.cpp
diff --git a/Source/core/fileapi/Blob.cpp b/Source/core/fileapi/Blob.cpp
index 0363fa818ec3a6f4c9ce0572d093c1d6948b4109..d2f02eb4d8b93a719c6b62f05b17725da1de40ba 100644
--- a/Source/core/fileapi/Blob.cpp
+++ b/Source/core/fileapi/Blob.cpp
@@ -106,13 +106,15 @@ void Blob::clampSliceOffsets(long long size, long long& start, long long& end)
end = size;
}
-PassRefPtrWillBeRawPtr<Blob> Blob::slice(long long start, long long end, const String& contentType, ExceptionState& exceptionState) const
+PassRefPtrWillBeRawPtr<Blob> Blob::slice(long long start, Optional<long long> optionalEnd, const String& contentType, ExceptionState& exceptionState) const
{
if (hasBeenClosed()) {
exceptionState.throwDOMException(InvalidStateError, "Blob has been closed.");
return nullptr;
}
+ long long end = optionalEnd.isMissing() ? std::numeric_limits<long long>::max() : optionalEnd.get();
+
long long size = this->size();
clampSliceOffsets(size, start, end);
« no previous file with comments | « Source/core/fileapi/Blob.h ('k') | Source/core/fileapi/File.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698