diff --git a/deps/miniv8/src/MiniV8Impl.cpp b/deps/miniv8/src/MiniV8Impl.cpp index 192ee4525d5ade52c57c97b4b96b4ca106df1adb..29b063d35953b1341e5da5839e99b0ff99ca74aa 100644 --- a/deps/miniv8/src/MiniV8Impl.cpp +++ b/deps/miniv8/src/MiniV8Impl.cpp @@ -680,8 +680,8 @@ JSValue v8::MacroAssembler::wrapSetter(JSContext* ctx, JSValueConst thisVal, JSV miniv8::V8Context* context = (miniv8::V8Context*)JS_GetContextOpaque(ctx); miniv8ReleaseAssert(contextOfSelf == context, "wrapSetter fail\n"); - miniv8::V8Value value(context, val); - v8::Local valueV8 = v8::Utils::convert(&value); + miniv8::V8Value* value = miniv8::V8Value::create(context, val); + v8::Local valueV8 = v8::Utils::convert(value); miniv8::V8Object* thisValV8 = miniv8::V8Object::create(context, thisVal); @@ -690,7 +690,7 @@ JSValue v8::MacroAssembler::wrapSetter(JSContext* ctx, JSValueConst thisVal, JSV void* args[v8::PropertyCallbackInfo::kArgsLength] = { 0 }; args[v8::PropertyCallbackInfo::kHolderIndex] = v8::Utils::maskPtr(thisValV8); // kHolderIndex - args[v8::PropertyCallbackInfo::kIsolateIndex] = &isolate; // kIsolateIndex + args[v8::PropertyCallbackInfo::kIsolateIndex] = isolate; // kIsolateIndex args[v8::PropertyCallbackInfo::kReturnValueIndex] = nullptr; // &returnValue[3]; // kReturnValueIndex args[v8::PropertyCallbackInfo::kDataIndex] = v8::Utils::maskPtr(thisValV8);// &dataV8; // kDataIndex args[v8::PropertyCallbackInfo::kThisIndex] = v8::Utils::maskPtr(thisValV8); // kThisIndex @@ -1222,8 +1222,8 @@ void V8Isolate::exitHandleScope() for (size_t i = 0; i < handles->size(); ++i) { void** ptr = (void**)handles->at(i); -// if (!(*ptr)) // GC的时候,有可能被释放的对象还在m_tempScopeHandles里,这会导致*ptr为null -// continue; + if (!(*ptr)) // GC的时候,有可能被释放的对象还在m_tempScopeHandles里,这会导致*ptr为null + continue; miniv8::V8Head* head = (miniv8::V8Head*)v8::Utils::toHandle((uintptr_t)(*ptr)); if (g_testFunc == head)