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

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