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

Unified Diff: Source/bindings/v8/V8Binding.h

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 | « LayoutTests/fast/files/file-constructor-expected.txt ('k') | Source/bindings/v8/custom/V8BlobCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.h
diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h
index 76250156a929c0716e6ee940f1b6fe4e139031cd..5e12d5e01631f3caff6e6eb438b6008e284729c2 100644
--- a/Source/bindings/v8/V8Binding.h
+++ b/Source/bindings/v8/V8Binding.h
@@ -646,7 +646,11 @@ namespace WebCore {
inline double toWebCoreDate(v8::Handle<v8::Value> object)
{
- return (object->IsDate() || object->IsNumber()) ? object->NumberValue() : std::numeric_limits<double>::quiet_NaN();
+ if (object->IsDate())
+ return v8::Handle<v8::Date>::Cast(object)->ValueOf();
+ if (object->IsNumber())
+ return object->NumberValue();
+ return std::numeric_limits<double>::quiet_NaN();
}
inline v8::Handle<v8::Value> v8DateOrNull(double value, v8::Isolate* isolate)
« no previous file with comments | « LayoutTests/fast/files/file-constructor-expected.txt ('k') | Source/bindings/v8/custom/V8BlobCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698