MCPcopy Create free account
hub / github.com/electron/electron / reset

Method reset

shell/common/node_bindings.h:91–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 auto operator<=>(const UvHandle& that) const = default;
90
91 void reset() {
92 auto* h = handle();
93 if (h != nullptr) {
94 if (uv_handle_get_type(h) == UV_UNKNOWN_HANDLE) {
95 // Never initialized, so it is on no loop and there is nothing to
96 // close, e.g. NodeBindings::dummy_uv_handle_ when a frame goes away
97 // before PrepareEmbedThread() runs.
98 delete t_;
99 } else {
100 DCHECK_EQ(0, uv_is_closing(h));
101 uv_close(h, OnClosed);
102 }
103 t_ = nullptr;
104 }
105 }
106
107 private:
108 static void OnClosed(uv_handle_t* handle) {

Callers 15

UpdateBadgeContentsMethod · 0.45
RelaunchAppWithHelperFunction · 0.45
PreHandleMSGMethod · 0.45
RemoteDisconnectedMethod · 0.45
SetEnabledInternalMethod · 0.45
SetMenuMethod · 0.45
OnListDoneMethod · 0.45
NotifyListenerAndEndMethod · 0.45
RunFileChooserEndMethod · 0.45
SetZoomLevelMethod · 0.45
SetZoomModeMethod · 0.45

Calls 1

handleFunction · 0.85

Tested by 10

CloseDevToolsMethod · 0.36
ReleaseWebContentsMethod · 0.36
CloseDevToolsMethod · 0.36
WebContentsDestroyedMethod · 0.36
ClearAllHeldCallbacksMethod · 0.36