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

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: Updated to latest File API ED. 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
Index: Source/bindings/v8/V8Binding.h
diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h
index 98d34c21affe8e6b2b0bacb5606f4c3c03558e35..f27f8bf85ace0aa5bcdac84c6cc1671505aa91dd 100644
--- a/Source/bindings/v8/V8Binding.h
+++ b/Source/bindings/v8/V8Binding.h
@@ -637,7 +637,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)

Powered by Google App Engine
This is Rietveld 408576698