GLib allocates and deallocates GObject private data structs itself. When those structs contain C++ members, their constructors and destructors are not called. This is not only dangerous, it makes RefPtr-type smart pointers much less useful. We can fix this problem by calling placement new on the private data struct during instance initialization and calling the destructor during finalization.
Created attachment 67200 [details] Patch making this change for WebKitWebView
Comment on attachment 67200 [details] Patch making this change for WebKitWebView >- if (priv->tooltipText) { >- gtk_tooltip_set_text(tooltip, priv->tooltipText); >+ if (priv->tooltipText.length() > 0) { Mmm, should use isEmpty() for consistency sake? >+ gtk_tooltip_set_text(tooltip, priv->tooltipText.data()); > return TRUE; > } > Looks great otherwise.
(In reply to comment #2) Thanks for the review! > Mmm, should use isEmpty() for consistency sake? CString doesn't have an isEmpty unfortunately. I could see it being useful though. Perhaps I'll propose that in another patch.
Comment on attachment 67200 [details] Patch making this change for WebKitWebView Clearing flags on attachment: 67200 Committed r67215: <http://trac.webkit.org/changeset/67215>
All reviewed patches have been landed. Closing bug.
http://trac.webkit.org/changeset/67215 might have broken Chromium Mac Release The following changes are on the blame list: http://trac.webkit.org/changeset/67216 http://trac.webkit.org/changeset/67215 http://trac.webkit.org/changeset/67205 http://trac.webkit.org/changeset/67206 http://trac.webkit.org/changeset/67207