Bug 26039 - [GTK] WebKitWebHistoryItem lifetime fixes
: [GTK] WebKitWebHistoryItem lifetime fixes
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: WebKit Gtk
: 528+ (Nightly build)
: PC Linux
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-27 00:50 PDT by Xan Lopez
Modified: 2009-05-28 07:54 PDT (History)
1 user (show)

See Also:


Attachments
history1.patch (2.43 KB, patch)
2009-05-27 00:51 PDT, Xan Lopez
jmalonzo: review+
Details | Formatted Diff | Diff
history2.patch (16.31 KB, patch)
2009-05-27 00:52 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
history2.patch (16.31 KB, patch)
2009-05-27 00:53 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
history3.patch (11.96 KB, patch)
2009-05-27 16:16 PDT, Xan Lopez
gns: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2009-05-27 00:50:10 PDT
As discussed on IRC the lifetime management of the history items has some problems right now. The attached patches give the details.
Comment 1 Xan Lopez 2009-05-27 00:51:43 PDT
Created attachment 30698 [details]
history1.patch

Delete backforward list before page on the webview.
Comment 2 Xan Lopez 2009-05-27 00:52:19 PDT
Created attachment 30699 [details]
history2.patch

Modify management of history items.
Comment 3 Xan Lopez 2009-05-27 00:53:19 PDT
Created attachment 30700 [details]
history2.patch

Modify management of history items.
Comment 4 Jan Alonzo 2009-05-27 03:37:43 PDT
Comment on attachment 30698 [details]
history1.patch

r=me.
Comment 5 Jan Alonzo 2009-05-27 03:56:58 PDT
(In reply to comment #2)
> Created an attachment (id=30699) [review]
> history2.patch
> 
> Modify management of history items.
> 

The original intention, and why the table is maintained by WebKitWebHistoryItem, was to share the history item between a WebBackForwardList and a *future* WebHistory. It's also the reason why I hesitated to make WebBackForwardList the sole owner of history items (i.e. the hash table maintained by back forward list).

But since I don't see WebHistory coming anytime soon, perhaps we can make the WebBackForwardList the owner of history items for now and figure this out once we have a WebHistory? Will that fix this issue?
Comment 6 Xan Lopez 2009-05-27 16:16:12 PDT
Created attachment 30719 [details]
history3.patch

A slightly less intrusive approach.
Comment 7 Gustavo Noronha (kov) 2009-05-27 16:28:48 PDT
Comment on attachment 30719 [details]
history3.patch

> +    GObjectClass *object_class = G_OBJECT_CLASS(klass);

The only problem I could fine is this misplaced * =P
Comment 8 Xan Lopez 2009-05-28 07:54:02 PDT
Landed both patches as 44227 and 44228. Closing.