public void Dispose() { if (!IsValid) { return; } try { if (_context.IsValid && JavaScriptContext.HasException) { JavaScriptContext.GetAndClearException(); } _scope.Dispose(); _runtime.Dispose(); } catch (Exception) { // eat all } }