Chromium Code Reviews| Index: Source/core/fileapi/Blob.h |
| diff --git a/Source/core/fileapi/Blob.h b/Source/core/fileapi/Blob.h |
| index f63761cb63ff7352bba4f0816be78e9db5813a0e..1cd9d279d330005f0de8795f2fe6c5a9759884b8 100644 |
| --- a/Source/core/fileapi/Blob.h |
| +++ b/Source/core/fileapi/Blob.h |
| @@ -41,6 +41,7 @@ |
| namespace WebCore { |
| +class ExceptionState; |
| class ExecutionContext; |
| class Blob : public ScriptWrappable, public URLRegistrable, public RefCounted<Blob> { |
| @@ -58,8 +59,23 @@ public: |
| virtual ~Blob(); |
| virtual unsigned long long size() const { return m_blobDataHandle->size(); } |
| - virtual PassRefPtr<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 PassRefPtr<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. |
| + PassRefPtr<Blob> slice(ExceptionState& exceptionState) const |
| + { |
| + return slice(0, std::numeric_limits<long long>::max(), String(), exceptionState); |
| + } |
| + PassRefPtr<Blob> slice(long long start, ExceptionState& exceptionState) const |
| + { |
| + return slice(start, std::numeric_limits<long long>::max(), String(), exceptionState); |
| + } |
| + PassRefPtr<Blob> slice(long long start, long long end, ExceptionState& exceptionState) const |
| + { |
| + return slice(start, end, String(), exceptionState); |
| + } |
|
kinuko
2014/03/03 05:18:46
Oops... sad, is this the common way for adding exc
sof
2014/03/03 09:36:52
It is definitely sad; I don't see a way to express
Nils Barth (inactive)
2014/03/04 01:11:54
No, I don't believe there's currently a cleaner wa
sof
2014/03/04 08:52:56
Having default value support would be the way to g
|
| + |
| + virtual void close(ExecutionContext*, ExceptionState&); |
| String type() const { return m_blobDataHandle->type(); } |
| String uuid() const { return m_blobDataHandle->uuid(); } |