@@ -34,7 +34,6 @@ typedef int mode_t;
34
34
35
35
namespace node {
36
36
37
- using v8::ApiObject;
38
37
using v8::Array;
39
38
using v8::ArrayBuffer;
40
39
using v8::BackingStore;
@@ -478,8 +477,8 @@ class FastHrtime : public BaseObject {
478
477
SET_MEMORY_INFO_NAME (FastHrtime)
479
478
SET_SELF_SIZE(FastHrtime)
480
479
481
- static FastHrtime* FromV8ApiObject(ApiObject api_object ) {
482
- Object* v8_object = reinterpret_cast <Object*>(&api_object );
480
+ static FastHrtime* FromV8Value(Local<Value> value ) {
481
+ Local< Object> v8_object = value. As <Object>( );
483
482
return static_cast <FastHrtime*>(
484
483
v8_object->GetAlignedPointerFromInternalField (BaseObject::kSlot ));
485
484
}
@@ -501,8 +500,8 @@ class FastHrtime : public BaseObject {
501
500
fields[2 ] = t % NANOS_PER_SEC;
502
501
}
503
502
504
- static void FastNumber (ApiObject receiver) {
505
- NumberImpl (FromV8ApiObject (receiver));
503
+ static void FastNumber (Local<Value> receiver) {
504
+ NumberImpl (FromV8Value (receiver));
506
505
}
507
506
508
507
static void SlowNumber (const FunctionCallbackInfo<Value>& args) {
@@ -515,8 +514,8 @@ class FastHrtime : public BaseObject {
515
514
fields[0 ] = t;
516
515
}
517
516
518
- static void FastBigInt (ApiObject receiver) {
519
- BigIntImpl (FromV8ApiObject (receiver));
517
+ static void FastBigInt (Local<Value> receiver) {
518
+ BigIntImpl (FromV8Value (receiver));
520
519
}
521
520
522
521
static void SlowBigInt (const FunctionCallbackInfo<Value>& args) {
0 commit comments