The cancellable history methods can cause leaks in user data
@csaavedra
Submitted by Claudio Saavedra Link to original bug (#683318)
Description
I suspect that the async method is cancelled and the callback never called, so FindURLsData is never freed.
We might need to change this to make it so that the callbacks are always called and delegate in them the responsibility to check whether the call was cancelled or not.
Maybe this even explains the other leaks we've found in the history backend?
==28316== 715 (576 direct, 139 indirect) bytes in 18 blocks are definitely lost in loss record 21,328 of 22,433 ==28316== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==28316== by 0x8D7C467: standard_malloc (gmem.c:85) ==28316== by 0x8D7C4F0: g_malloc (gmem.c:159) ==28316== by 0x8D9472D: g_slice_alloc (gslice.c:1003) ==28316== by 0x459039: ephy_completion_model_update_for_string (ephy-completion-model.c:550) ==28316== by 0x44ED8D: user_changed_cb (ephy-location-controller.c:198) ==28316== by 0x8CDD853: g_cclosure_marshal_VOID__VOID (gmarshal.c:85) ==28316== by 0x8CDA7CF: g_closure_invoke (gclosure.c:777) ==28316== by 0x8CF7F5E: signal_emit_unlocked_R (gsignal.c:3551) ==28316== by 0x8CF71C7: g_signal_emit_valist (gsignal.c:3300) ==28316== by 0x8CF770F: g_signal_emit (gsignal.c:3356) ==28316== by 0x486A39: editable_changed_cb (ephy-location-entry.c:406) ==28316== by 0x8CDD853: g_cclosure_marshal_VOID__VOID (gmarshal.c:85) ==28316== by 0x8CDA7CF: g_closure_invoke (gclosure.c:777) ==28316== by 0x8CF7F5E: signal_emit_unlocked_R (gsignal.c:3551) ==28316== by 0x8CF71C7: g_signal_emit_valist (gsignal.c:3300) ==28316== by 0x8CF786D: g_signal_emit_by_name (gsignal.c:3393) ==28316== by 0x8383A80: end_change (gtkentry.c:2686) ==28316== by 0x8388498: gtk_entry_real_insert_text (gtkentry.c:4786) ==28316== by 0x8431C57: _gtk_marshal_VOID__STRING_INT_POINTER (gtkmarshalers.c:6827)
Version: git master