Browse Source

src: NODE_UNIXTIME_V8 needs to use an Isolate

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
archived-io.js-v0.10
Rohini Harendra 11 years ago
committed by Timothy J Fontaine
parent
commit
32b4563280
  1. 3
      src/node.h

3
src/node.h

@ -172,7 +172,8 @@ NODE_EXTERN extern bool no_deprecation;
NODE_EXTERN int Start(int argc, char *argv[]);
/* Converts a unixtime to V8 Date */
#define NODE_UNIXTIME_V8(t) v8::Date::New(1000*static_cast<double>(t))
#define NODE_UNIXTIME_V8(t) v8::Date::New(v8::Isolate::GetCurrent(), \
1000 * static_cast<double>(t))
#define NODE_V8_UNIXTIME(v) (static_cast<double>((v)->NumberValue())/1000.0);
// Used to be a macro, hence the uppercase name.

Loading…
Cancel
Save