Bug 24221

Summary: [GTK] Do not emit load-finished when being disposed
Product: WebKit Reporter: Xan Lopez <xan.lopez>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
disposing.patch ap: review+

Xan Lopez
Reported 2009-02-27 00:52:37 PST
webkit_web_view_stop_load() is called from dispose() on WebKitWebView. This eventually calls postProgressFinishedNotification in FrameLoaderClientGtk, which emits load-finished. Add a 'disposing' flag to WebView that we can check here, so we avoid emitting signals on objects on their way to be destroyed. This fixes a bunch of critical warnings when closing a loading WebView.
Attachments
disposing.patch (4.18 KB, patch)
2009-02-27 00:55 PST, Xan Lopez
ap: review+
Xan Lopez
Comment 1 2009-02-27 00:55:05 PST
Created attachment 28067 [details] disposing.patch
Alexey Proskuryakov
Comment 2 2009-02-27 00:57:56 PST
Comment on attachment 28067 [details] disposing.patch r=me > + /* > + * We can get a stopLoad() from dispose when the object is being > + * destroyed, don't emit the signal in that case. > + */ We prefer C++-style comments in C++ files. Is this check needed before other g_signal_emit_by_name() calls?
Xan Lopez
Comment 3 2009-02-27 01:01:11 PST
(In reply to comment #2) > (From update of attachment 28067 [details] [review]) > r=me > > > + /* > > + * We can get a stopLoad() from dispose when the object is being > > + * destroyed, don't emit the signal in that case. > > + */ > > We prefer C++-style comments in C++ files. OK, was just being consistent with other multi-line comments in the file :) > > Is this check needed before other g_signal_emit_by_name() calls? > Does not seem so, this is the only signal emitted during dispose AFAICT. We generally try to protect only the code paths needed on dispose, otherwise you'd need to protect every single function and signal just in case.
Jan Alonzo
Comment 4 2009-02-27 03:30:58 PST
Landed in r41284. Thanks!
Note You need to log in before you can comment on or make changes to this bug.