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

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

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/URL.idl ('k') | Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/Blob.h
diff --git a/Source/core/fileapi/Blob.h b/Source/core/fileapi/Blob.h
index 8a559d795a49e30ca0cb69cdfb5e4a60a8de5d19..529117ded609872678a672942e0f86f058e6e834 100644
--- a/Source/core/fileapi/Blob.h
+++ b/Source/core/fileapi/Blob.h
@@ -42,6 +42,7 @@
namespace WebCore {
+class ExceptionState;
class ExecutionContext;
class Blob : public RefCountedWillBeGarbageCollectedFinalized<Blob>, public ScriptWrappable, public URLRegistrable {
@@ -59,8 +60,23 @@ public:
virtual ~Blob();
virtual unsigned long long size() const { return m_blobDataHandle->size(); }
- virtual PassRefPtrWillBeRawPtr<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
- virtual void close(ExecutionContext*);
+ virtual PassRefPtrWillBeRawPtr<Blob> slice(long long start, long long end, const String& contentType, ExceptionState&) const;
+
+ // To allow ExceptionState to be passed in last, manually enumerate the optional argument overloads.
+ PassRefPtrWillBeRawPtr<Blob> slice(ExceptionState& exceptionState) const
+ {
+ return slice(0, std::numeric_limits<long long>::max(), String(), exceptionState);
+ }
+ PassRefPtrWillBeRawPtr<Blob> slice(long long start, ExceptionState& exceptionState) const
+ {
+ return slice(start, std::numeric_limits<long long>::max(), String(), exceptionState);
+ }
+ PassRefPtrWillBeRawPtr<Blob> slice(long long start, long long end, ExceptionState& exceptionState) const
+ {
+ return slice(start, end, String(), exceptionState);
+ }
+
+ virtual void close(ExecutionContext*, ExceptionState&);
String type() const { return m_blobDataHandle->type(); }
String uuid() const { return m_blobDataHandle->uuid(); }
« no previous file with comments | « Source/core/dom/URL.idl ('k') | Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698