@@ -34,7 +34,6 @@ typedef int mode_t;
3434
3535namespace node {
3636
37- using v8::ApiObject;
3837using v8::Array;
3938using v8::ArrayBuffer;
4039using v8::BackingStore;
@@ -478,8 +477,8 @@ class FastHrtime : public BaseObject {
478477 SET_MEMORY_INFO_NAME (FastHrtime)
479478 SET_SELF_SIZE(FastHrtime)
480479
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>( );
483482 return static_cast <FastHrtime*>(
484483 v8_object->GetAlignedPointerFromInternalField (BaseObject::kSlot ));
485484 }
@@ -501,8 +500,8 @@ class FastHrtime : public BaseObject {
501500 fields[2 ] = t % NANOS_PER_SEC;
502501 }
503502
504- static void FastNumber (ApiObject receiver) {
505- NumberImpl (FromV8ApiObject (receiver));
503+ static void FastNumber (Local<Value> receiver) {
504+ NumberImpl (FromV8Value (receiver));
506505 }
507506
508507 static void SlowNumber (const FunctionCallbackInfo<Value>& args) {
@@ -515,8 +514,8 @@ class FastHrtime : public BaseObject {
515514 fields[0 ] = t;
516515 }
517516
518- static void FastBigInt (ApiObject receiver) {
519- BigIntImpl (FromV8ApiObject (receiver));
517+ static void FastBigInt (Local<Value> receiver) {
518+ BigIntImpl (FromV8Value (receiver));
520519 }
521520
522521 static void SlowBigInt (const FunctionCallbackInfo<Value>& args) {
0 commit comments