@@ -130,7 +130,7 @@ static void OnLockCallbackFulfilled(const FunctionCallbackInfo<Value>& info) {
130130 Environment* env = Environment::GetCurrent (info);
131131
132132 BaseObjectPtr<LockHolder> lock_holder{
133- BaseObject::FromJSObject<LockHolder>(info.Data ())};
133+ BaseObject::FromJSObject<LockHolder>(info.DataV2 (). As <Value> ())};
134134 std::shared_ptr<Lock> lock = lock_holder->lock ();
135135
136136 // Release the lock and continue processing the queue.
@@ -144,7 +144,7 @@ static void OnLockCallbackRejected(const FunctionCallbackInfo<Value>& info) {
144144 Environment* env = Environment::GetCurrent (info);
145145
146146 BaseObjectPtr<LockHolder> lock_holder{
147- BaseObject::FromJSObject<LockHolder>(info.Data ())};
147+ BaseObject::FromJSObject<LockHolder>(info.DataV2 (). As <Value> ())};
148148 std::shared_ptr<Lock> lock = lock_holder->lock ();
149149
150150 LockManager::GetCurrent ()->ReleaseLockAndProcessQueue (
@@ -154,13 +154,13 @@ static void OnLockCallbackRejected(const FunctionCallbackInfo<Value>& info) {
154154// Called when the promise returned from the user's callback resolves
155155static void OnIfAvailableFulfill (const FunctionCallbackInfo<Value>& info) {
156156 HandleScope handle_scope (info.GetIsolate ());
157- USE (info.Data ().As <Promise::Resolver>()->Resolve (
157+ USE (info.DataV2 (). As <Value> ().As <Promise::Resolver>()->Resolve (
158158 info.GetIsolate ()->GetCurrentContext (), info[0 ]));
159159}
160160
161161// Called when the promise returned from the user's callback rejects
162162static void OnIfAvailableReject (const FunctionCallbackInfo<Value>& info) {
163- USE (info.Data ().As <Promise::Resolver>()->Reject (
163+ USE (info.DataV2 (). As <Value> ().As <Promise::Resolver>()->Reject (
164164 info.GetIsolate ()->GetCurrentContext (), info[0 ]));
165165}
166166
0 commit comments