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

Unified Diff: Source/bindings/v8/custom/V8BlobCustom.cpp

Issue 74213009: File constructor understands lastModified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed feedback. Created 7 years, 1 month 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/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8BlobCustomHelpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e5c8faa748f4441ae74e3b2d35fa4db2fb9b1ea0 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());
}
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8BlobCustomHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698