Index: Source/bindings/v8/custom/V8BlobCustomHelpers.h |
diff --git a/Source/bindings/v8/custom/V8ErrorEventCustom.cpp b/Source/bindings/v8/custom/V8BlobCustomHelpers.h |
similarity index 65% |
copy from Source/bindings/v8/custom/V8ErrorEventCustom.cpp |
copy to Source/bindings/v8/custom/V8BlobCustomHelpers.h |
index 01ed71acdacf4a30c7784766156695687e54623d..8d8d1ad330ea37abef386462dfc88674de6741ec 100644 |
--- a/Source/bindings/v8/custom/V8ErrorEventCustom.cpp |
+++ b/Source/bindings/v8/custom/V8BlobCustomHelpers.h |
@@ -28,32 +28,25 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
kinuko
2013/11/14 05:41:06
This header file has no include guard-- is it inte
pwnall-personal
2013/11/14 14:31:19
Done.
Yikes! Thank you for catching this!
|
-#include "config.h" |
-#include "V8ErrorEvent.h" |
- |
-#include "RuntimeEnabledFeatures.h" |
-#include "V8Event.h" |
-#include "bindings/v8/DOMWrapperWorld.h" |
-#include "bindings/v8/Dictionary.h" |
-#include "bindings/v8/ScriptState.h" |
-#include "bindings/v8/SerializedScriptValue.h" |
#include "bindings/v8/V8Binding.h" |
-#include "bindings/v8/V8DOMWrapper.h" |
-#include "bindings/v8/V8HiddenPropertyName.h" |
-#include "core/dom/ContextFeatures.h" |
namespace WebCore { |
-void V8ErrorEvent::errorAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info) |
-{ |
- v8::Handle<v8::Value> error = info.Holder()->GetHiddenValue(V8HiddenPropertyName::error(info.GetIsolate())); |
+class BlobBuilder; |
- if (!error.IsEmpty()) { |
- v8SetReturnValue(info, error); |
- return; |
- } |
+// Shared code between the custom constructor bindings for Blob and File. |
+namespace V8BlobCustomHelpers { |
- v8SetReturnValueNull(info); |
-} |
+// Extracts the "type" and "endings" properties out of the BlobPropertyBag passed to a Blob constructor. |
+// http://www.w3.org/TR/FileAPI/#constructorParams |
+// Returns true if everything went well, false if a JS exception was thrown. |
+bool processBlobPropertyBag(v8::Local<v8::Value> propertyBag, v8::Isolate*, const char* blobClassName, String& contentType, String& endings); |
+ |
+// Appends the blobParts passed to a Blob constructor into a BlobBuilder. |
+// http://www.w3.org/TR/FileAPI/#constructorParams |
+// Returns true if everything went well, false if a JS exception was thrown. |
+bool processBlobParts(v8::Local<v8::Object> blobParts, uint32_t blobPartsLength, v8::Isolate*, const String& endings, BlobBuilder&); |
+ |
+} // namespace V8BlobCustomHelpers |
} // namespace WebCore |