wxWidgets/include/wx/gtk
Vadim Zeitlin c3980646f6 Fix crash on wxWebViewWebKit window destruction.
We were getting crashes due to using methods of already half-destroyed object
when wxWebView window was destroyed in wxGTK, with the following abbreviated
stack:

 #0  wxgtk_webview_webkit_load_status (widget=0x12eb380, webKitCtrl=0x13ee040) at src/gtk/webview_webkit.cpp:38
...
 #8  0x00007ffff05ca281 in dispatchDidFailLoad (error=..., this=0x7fffe32db900) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:1054
 #9  WebKit::FrameLoaderClient::dispatchDidFailLoad (this=0x7fffe32db900, error=...) at ../Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp:1049
 #10 0x00007ffff0b0de54 in WebCore::FrameLoader::checkLoadCompleteForThisFrame (this=0x7fffe3221b70) at ../Source/WebCore/loader/FrameLoader.cpp:2128
 #11 0x00007ffff0b0cfde in WebCore::FrameLoader::checkLoadComplete (this=<optimized out>) at ../Source/WebCore/loader/FrameLoader.cpp:2370
 #12 0x00007ffff0b0a3b2 in WebCore::FrameLoader::receivedMainResourceError (this=0x7fffe3221b70, error=..., isComplete=true) at ../Source/WebCore/loader/FrameLoader.cpp:2640
 #13 0x00007ffff0b423b7 in cancel (error=..., this=0x7fffe3279680) at ../Source/WebCore/loader/ResourceLoader.cpp:399
 #14 WebCore::ResourceLoader::cancel (this=0x7fffe3279680, error=...) at ../Source/WebCore/loader/ResourceLoader.cpp:353
 #15 0x00007ffff0b420c0 in WebCore::ResourceLoader::cancel (this=<optimized out>) at ../Source/WebCore/loader/ResourceLoader.cpp:350
 #16 0x00007ffff0afda9e in WebCore::DocumentLoader::stopLoading (this=0x7fffa081d800) at ../Source/WebCore/loader/DocumentLoader.cpp:258
 #17 0x00007ffff0b09561 in stopAllLoaders (clearProvisionalItemPolicy=WebCore::ShouldClearProvisionalItem, this=0x7fffe3221b70) at ../Source/WebCore/loader/FrameLoader.cpp:1523
 #18 WebCore::FrameLoader::stopAllLoaders (this=0x7fffe3221b70, clearProvisionalItemPolicy=WebCore::ShouldClearProvisionalItem) at ../Source/WebCore/loader/FrameLoader.cpp:1501
 #19 0x00007ffff0b0d17a in WebCore::FrameLoader::stopForUserCancel (this=0x7fffe3221b70, deferCheckLoadComplete=false) at ../Source/WebCore/loader/FrameLoader.cpp:1541
 #20 0x00007ffff05f3a36 in webkit_web_view_dispose (object=0x12eb380) at ../Source/WebKit/gtk/webkit/webkitwebview.cpp:1327
 #21 0x00007ffff27ff7a0 in g_object_run_dispose (object=0x12eb380) at /tmp/buildd/glib2.0-2.32.3/./gobject/gobject.c:1061
 #22 0x00007ffff4476c1e in gtk_scrolled_window_forall (container=0x7fff9c007d10, include_internals=0, callback=0x7ffff452cd20 <IA__gtk_widget_destroy>, callback_data=0x0)
     at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkscrolledwindow.c:1085
 #23 0x00007ffff439872f in gtk_container_destroy (object=0x7fff9c007d10) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkcontainer.c:1073
...
 #28 0x00007ffff443cd60 in gtk_object_dispose (gobject=0x7fff9c007d10) at /tmp/buildd/gtk+2.0-2.24.10/gtk/gtkobject.c:421
 #29 0x00007ffff27ff7a0 in g_object_run_dispose (object=0x7fff9c007d10) at /tmp/buildd/glib2.0-2.32.3/./gobject/gobject.c:1061
 #30 0x00007ffff6cb65ac in wxWindow::~wxWindow (this=0x13ee040, __in_chrg=<optimized out>) at src/gtk/window.cpp:2367
 #31 0x00007ffff6d71241 in wxControlBase::~wxControlBase (this=0x13ee040, __in_chrg=<optimized out>) at src/common/ctrlcmn.cpp:49
 #32 0x00000000005cf761 in wxControl::~wxControl (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/control.h:27
 #33 0x00007ffff7bd1eae in wxWebView::~wxWebView (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/webview.h:96
 #34 0x00007ffff7bd3443 in wxWebViewWebKit::~wxWebViewWebKit (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/webview_webkit.h:26
 #35 0x00007ffff7bd34ae in wxWebViewWebKit::~wxWebViewWebKit (this=0x13ee040, __in_chrg=<optimized out>) at include/wx/gtk/webview_webkit.h:26

Fix this by setting m_isBeingDeleted flag for wxWebViewWebKit early and
checking it in the callback.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-23 15:03:05 +00:00
..
gnome Fixed various typos. 2011-03-22 14:17:38 +00:00
hildon add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros 2009-02-08 11:45:59 +00:00
private support for GTK3 2012-06-30 20:39:06 +00:00
accel.h Added licence/copyright information 2005-05-04 18:57:50 +00:00
animate.h Reverted bogus fix for bogus bug report #13402. 2012-02-05 22:53:39 +00:00
anybutton.h Refactor wxButton and wxToggleButton to derive from wxAnyButton. 2011-06-14 13:00:42 +00:00
app.h remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them 2011-09-07 16:56:50 +00:00
assertdlg_gtk.h Fix display of "const" methods in wxGTK assert dialog. 2012-03-21 00:11:12 +00:00
bitmap.h support for GTK3 2012-06-30 20:39:06 +00:00
bmpbuttn.h set the initial size of bitmap buttons correctly again after it was broken by r61081 (closes #10927) 2009-06-27 22:22:48 +00:00
bmpcbox.h Added wxGTK wxBitmapComboBox::DoGetBestSize() implementation that takes bitmap size into acccount. 2009-07-18 08:33:55 +00:00
brush.h declare future-deprecated SetStyle(int) in wxPen/Brush and not wxPen/BrushBase as it's useless there (compilation of user code doing pen.SetStyle(wxDOT) still fails) 2008-06-17 17:28:26 +00:00
button.h Refactor wxButton and wxToggleButton to derive from wxAnyButton. 2011-06-14 13:00:42 +00:00
calctrl.h Implement wxCalendarCtrl::SetDateRange() in the native GTK version. 2011-06-19 22:46:36 +00:00
checkbox.h remove unnecessary DoGetBestSize 2009-12-05 19:26:39 +00:00
checklst.h Globally replace _T() with wxT(). 2009-07-23 20:30:22 +00:00
chkconf.h support for GTK3 2012-06-30 20:39:06 +00:00
choice.h Add "GTK" prefix to wxChoice::{Dis,En}ableEvents() methods in wxGTK. 2010-10-15 23:46:32 +00:00
clipbrd.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
clrpicker.h support for GTK3 2012-06-30 20:39:06 +00:00
collpane.h Also report events from wxCollapsiblePane's label 2009-02-03 09:53:33 +00:00
colordlg.h Move wxColourData and wxFontData into separate files. 2011-01-07 05:26:57 +00:00
colour.h support for GTK3 2012-06-30 20:39:06 +00:00
combobox.h Update the text part of combobox when changing text of selected item in wxGTK. 2012-03-11 23:55:19 +00:00
control.h support for GTK3 2012-06-30 20:39:06 +00:00
cursor.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
dataform.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
dataobj2.h Use both URL-specific and plain text formats in wxGTK wxURLDataObject. 2012-07-20 11:55:10 +00:00
dataobj.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
dataview.h Replace wxDataViewCtrl::StartEditor() with EditItem(). 2012-01-17 14:05:17 +00:00
dc.h avoid creating and immediately destroying a wxGraphicsContext when creating a wxDC with wxGTK3 2012-07-13 16:58:37 +00:00
dcclient.h remove unneeded includes and forward declaration 2012-03-25 23:34:42 +00:00
dcmemory.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
dcscreen.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
dialog.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
dirdlg.h Implement wxDirDialog:: and wxFileDialog::Create() in wxGTK. 2012-03-14 12:32:27 +00:00
dnd.h Add wxDropSource::SetIcon for wxGTK to mimic SetCursor on the other ports. 2012-05-03 23:30:40 +00:00
dvrenderer.h remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them 2011-09-07 16:56:50 +00:00
dvrenderers.h support for GTK3 2012-06-30 20:39:06 +00:00
evtloop.h Refactor wxEventLoopSource-related code. 2009-10-22 11:36:35 +00:00
evtloopsrc.h no real change: just fix RCS-ID so that it reflects the current revision number 2010-04-25 21:33:16 +00:00
filectrl.h Do not put semicolons after the definition of an inline function. 2011-12-29 14:42:13 +00:00
filedlg.h Implement wxDirDialog:: and wxFileDialog::Create() in wxGTK. 2012-03-14 12:32:27 +00:00
filehistory.h Integrate with GNOME's Recent Documents menu. 2010-05-07 06:45:48 +00:00
filepicker.h Remove use of "size-request" signal for wxWindow sizing. 2012-05-17 15:29:50 +00:00
font.h move Pango underline workaround into wxFont::GTKSetPangoAttrs 2012-01-29 08:14:34 +00:00
fontdlg.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
fontpicker.h remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them 2011-09-07 16:56:50 +00:00
frame.h Move SendIdleEvents() from wxApp to wxWindow. 2011-01-08 06:42:41 +00:00
gauge.h Do not put semicolons after the definition of an inline function. 2011-12-29 14:42:13 +00:00
glcanvas.h support for GTK3 2012-06-30 20:39:06 +00:00
hyperlink.h need to override DoGetBestClientSize() to get correct size, fixes #13088 2011-04-02 20:43:29 +00:00
infobar.h Remove use of "size-request" signal for wxWindow sizing. 2012-05-17 15:29:50 +00:00
listbox.h clean up wxGTK tooltip code 2011-03-23 17:36:10 +00:00
mdi.h fix wxMDIChildFrame after r69390 and r69468, TLW realization code should not be called, fixes #13593 2011-10-25 16:56:57 +00:00
menu.h Workaround for Ubuntu 12.04 run time warning 2012-06-05 16:49:28 +00:00
menuitem.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
minifram.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
msgdlg.h Add support for wxHELP button to wxMessageDialog. 2011-08-04 22:53:42 +00:00
nonownedwnd.h Added wxNonOwnedWindow::SetShape(wxGraphicsPath). 2011-10-18 21:56:52 +00:00
notebook.h Implement wxNotebook::CalcSizeFromPage() for wxGTK. 2011-12-24 18:19:26 +00:00
pen.h remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them 2011-09-07 16:56:50 +00:00
popupwin.h remove unnecessary override of AddChildGTK 2012-02-28 17:25:59 +00:00
print.h Fixed various typos. 2011-03-22 14:17:38 +00:00
private.h support for GTK3 2012-06-30 20:39:06 +00:00
radiobox.h clean up wxGTK tooltip code 2011-03-23 17:36:10 +00:00
radiobut.h simplify Enable() 2009-12-05 19:25:04 +00:00
region.h support for GTK3 2012-06-30 20:39:06 +00:00
scrolbar.h avoid deprecated functions and direct struct access 2011-03-28 06:27:49 +00:00
scrolwin.h do only what is necessary in SetScrollbars(), let the base class do the rest 2009-02-08 20:51:44 +00:00
setup0.h update minimum GTK2 version requirement to 2.6 2012-07-10 16:39:44 +00:00
slider.h No changes whatsoever, just remove trailing whitespace. 2010-09-30 11:44:45 +00:00
spinbutt.h simplify Enable() 2009-12-05 19:25:04 +00:00
spinctrl.h No changes, synchronised source names that appear commented at the top of files with the actual path to the files. 2011-03-20 00:14:35 +00:00
statbmp.h No changes, just removed hard tabs and trailing white space. 2009-08-21 10:41:26 +00:00
statbox.h fix virtual override broken in r58875 2012-02-28 17:06:56 +00:00
statline.h default name of wxStaticLine should be wxStaticLineNameStr, not wxStaticTextNameStr 2006-12-09 14:52:59 +00:00
stattext.h remove DoSetSize override, unneeded after r72001 2012-07-10 17:27:41 +00:00
taskbar.h Make wxTaskBarIcon's ctor have the same API on all platforms even though setting the icon type can only be done on wxOSX-cocoa 2012-04-20 05:41:54 +00:00
textctrl.h Add wxTextCtrl::PositionToCoords() functions for wxMSW and wxGTK. 2011-07-29 15:11:54 +00:00
textentry.h override DoSetValue() to avoid unnecessary clipboard operations, fixes #14369 2012-07-01 16:43:16 +00:00
tglbtn.h Refactor wxButton and wxToggleButton to derive from wxAnyButton. 2011-06-14 13:00:42 +00:00
toolbar.h Make the CreateTool factories be public so they can be used from application code 2012-03-10 00:01:09 +00:00
tooltip.h clean up wxGTK tooltip code 2011-03-23 17:36:10 +00:00
toplevel.h update size hints when decoration size becomes known, and preserve size hint increments 2012-06-24 16:18:28 +00:00
treeentry_gtk.h avoid deprecated functions and direct struct access 2011-03-28 06:27:49 +00:00
webview_webkit.h Fix crash on wxWebViewWebKit window destruction. 2012-07-23 15:03:05 +00:00
webviewhistoryitem_webkit.h Minor changes, just trim trailing spaces in webview code. 2012-03-28 18:00:30 +00:00
window.h support for GTK3 2012-06-30 20:39:06 +00:00