// 在主线程回调 private void OnParentDestroy(ScriptRuntime parent) { if (!_self.IsUndefined()) { _parentRuntime.FreeValue(_self); _self = JSApi.JS_UNDEFINED; } _runtime.Shutdown(); }