summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp
index 6b479ae..4cd58f5 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/DateInstance.cpp
@@ -22,6 +22,8 @@
#include "config.h"
#include "DateInstance.h"
+#include "JSGlobalObject.h"
+
#include <math.h>
#include <wtf/DateMath.h>
#include <wtf/MathExtras.h>
@@ -45,6 +47,13 @@ DateInstance::DateInstance(NonNullPassRefPtr<Structure> structure)
{
}
+DateInstance::DateInstance(ExecState* exec, double time)
+ : JSWrapperObject(exec->lexicalGlobalObject()->dateStructure())
+ , m_cache(0)
+{
+ setInternalValue(jsNumber(exec, timeClip(time)));
+}
+
DateInstance::~DateInstance()
{
delete m_cache;