Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: add v8::Date::ValueOf, fix ttd support in node_zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
boingoing committed Nov 15, 2018
1 parent d93a96f commit 4a8c1ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deps/chakrashim/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,8 @@ class V8_EXPORT Date : public Object {
static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context,
double time);

double ValueOf() const;

static Date* Cast(Value* obj);
};

Expand Down
6 changes: 6 additions & 0 deletions deps/chakrashim/src/v8date.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ Date* Date::Cast(v8::Value* obj) {
return static_cast<Date*>(obj);
}

double Date::ValueOf() const {
CHAKRA_ASSERT(this->IsDate());

return this->NumberValue();
}

} // namespace v8

0 comments on commit 4a8c1ed

Please sign in to comment.