| Index: Source/bindings/v8/custom/V8BlobCustom.cpp
|
| diff --git a/Source/bindings/v8/custom/V8BlobCustom.cpp b/Source/bindings/v8/custom/V8BlobCustom.cpp
|
| index be506f80374096ebac08dd0b60c987fc79110ba9..ad3e08eb57d5c6e1a7bbe911b38e5db64a80471f 100644
|
| --- a/Source/bindings/v8/custom/V8BlobCustom.cpp
|
| +++ b/Source/bindings/v8/custom/V8BlobCustom.cpp
|
| @@ -55,24 +55,23 @@ void V8Blob::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| }
|
| }
|
|
|
| - String contentType;
|
| - String endings = "transparent"; // default if no BlobPropertyBag is passed
|
| + V8BlobCustomHelpers::ParsedProperties properties(false);
|
| if (info.Length() > 1) {
|
| if (!info[1]->IsObject()) {
|
| throwTypeError(ExceptionMessages::failedToConstruct("Blob", "The 2nd argument is not of type Object."), info.GetIsolate());
|
| return;
|
| }
|
|
|
| - if (!V8BlobCustomHelpers::processBlobPropertyBag(info[1], "Blob", contentType, endings, info.GetIsolate()))
|
| + if (!properties.parseBlobPropertyBag(info[1], "Blob", info.GetIsolate()))
|
| return;
|
| }
|
|
|
| BlobBuilder blobBuilder;
|
| v8::Local<v8::Object> blobParts = v8::Local<v8::Object>::Cast(info[0]);
|
| - if (!V8BlobCustomHelpers::processBlobParts(blobParts, length, endings, blobBuilder, info.GetIsolate()))
|
| + if (!V8BlobCustomHelpers::processBlobParts(blobParts, length, properties.endings, blobBuilder, info.GetIsolate()))
|
| return;
|
|
|
| - RefPtr<Blob> blob = blobBuilder.createBlob(contentType);
|
| + RefPtr<Blob> blob = blobBuilder.createBlob(properties.contentType);
|
| v8SetReturnValue(info, blob.release());
|
| }
|
|
|
|
|