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

Unified Diff: Source/bindings/core/v8/custom/V8FileCustom.cpp

Issue 458953002: Remove custom getters for File.lastModified{Date} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Preserve comment Created 6 years, 4 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 | « no previous file | Source/core/fileapi/File.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/custom/V8FileCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8FileCustom.cpp b/Source/bindings/core/v8/custom/V8FileCustom.cpp
index f70df28048935b246a293fddc2d635fe04f7d5ad..1cdb5759322634ed625eab6e409ab4235b195153 100644
--- a/Source/bindings/core/v8/custom/V8FileCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8FileCustom.cpp
@@ -33,7 +33,6 @@
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/custom/V8BlobCustomHelpers.h"
-#include "platform/RuntimeEnabledFeatures.h"
namespace blink {
@@ -41,12 +40,6 @@ void V8File::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ConstructionContext, "File", info.Holder(), info.GetIsolate());
- if (!RuntimeEnabledFeatures::fileConstructorEnabled()) {
- exceptionState.throwTypeError("Illegal constructor");
- exceptionState.throwIfNeeded();
- return;
- }
-
if (info.Length() < 2) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
exceptionState.throwIfNeeded();
@@ -89,33 +82,4 @@ void V8File::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
v8SetReturnValue(info, file.release());
}
-void V8File::lastModifiedDateAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- // The auto-generated getters return null when the method in the underlying
- // implementation returns NaN. The File API says we should return the
- // current time when the last modification time is unknown.
- // Section 7.2 of the File API spec. http://dev.w3.org/2006/webapi/FileAPI/
-
- File* file = V8File::toNative(info.Holder());
- double lastModified = file->lastModifiedDate();
- if (!isValidFileTime(lastModified))
- lastModified = currentTimeMS();
-
- // lastModifiedDate returns a Date instance.
- // http://www.w3.org/TR/FileAPI/#file-attrs
- v8SetReturnValue(info, v8::Date::New(info.GetIsolate(), lastModified));
-}
-
-void V8File::lastModifiedAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- File* file = V8File::toNative(info.Holder());
- double lastModified = file->lastModifiedDate();
- if (!isValidFileTime(lastModified))
- lastModified = currentTimeMS();
-
- // lastModified returns a number, not a Date instance.
- // http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
- v8SetReturnValue(info, floor(lastModified));
-}
-
} // namespace blink
« no previous file with comments | « no previous file | Source/core/fileapi/File.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698