File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ void AllocDispose(Handle<Object> obj) {
206206 HandleScope scope (node_isolate);
207207
208208 if (using_alloc_cb && obj->Has (smalloc_sym)) {
209- Local<External> ext = obj->Get (smalloc_sym).As <External>();
209+ Local<External> ext = obj->GetHiddenValue (smalloc_sym).As <External>();
210210 CallbackInfo* cb_info = static_cast <CallbackInfo*>(ext->Value ());
211211 Local<Object> obj = PersistentToLocal (cb_info->p_obj );
212212 TargetFreeCallback (node_isolate, obj, cb_info);
@@ -252,6 +252,7 @@ void Alloc(Handle<Object> obj,
252252 cb_info->cb = fn;
253253 cb_info->hint = hint;
254254 cb_info->p_obj .Reset (node_isolate, obj);
255+ obj->SetHiddenValue (smalloc_sym, External::New (cb_info));
255256
256257 node_isolate->AdjustAmountOfExternalAllocatedMemory (length +
257258 sizeof (*cb_info));
You can’t perform that action at this time.
0 commit comments