fix weak_ptr checking in JSObject, wrap InvokeAsync usage in catch