RESOLVED FIXED 27145
[Gtk][REGRESSION] subframe-navigate-during-main-frame-load.html fails after r45615
https://bugs.webkit.org/show_bug.cgi?id=27145
Summary [Gtk][REGRESSION] subframe-navigate-during-main-frame-load.html fails after r...
Jan Alonzo
Reported 2009-07-10 00:11:26 PDT
Changeset: http://trac.webkit.org/changeset/45615 Failing test: fast/loader/subframe-navigate-during-main-frame-load.html Test diff: ============== Back Forward List ============== - (file test):fast/loader/subframe-navigate-during-main-frame-load.html **nav target** -curr-> (file test):fast/loader/resources/subframe-navigate-during-main-frame-load2.html **nav target** + file:///home/jmalonzo/OpenSource/WebKit/LayoutTests/fast/loader/subframe-navigate-during-main-frame-load.html **nav target** +curr-> file:///home/jmalonzo/OpenSource/WebKit/LayoutTests/fast/loader/resources/subframe-navigate-during-main-frame-load2.html **nav target** data:text/html,%3Cbody%20onload=%22layoutTestController.notifyDone();%22%3E%3C/body%3E (in frame "subframe") =============================================== Doing a similar fix as the one in r45615 in Gtk's DRT should fix this.
Attachments
patch (3.06 KB, patch)
2009-07-13 01:00 PDT, Jan Alonzo
no flags
updated patch (2.90 KB, patch)
2009-07-15 07:07 PDT, Jan Alonzo
no flags
Updated to use result->str instead of a temp var (3.01 KB, patch)
2009-07-17 18:17 PDT, Jan Alonzo
gustavo: review+
Jan Alonzo
Comment 1 2009-07-13 01:00:46 PDT
Gustavo Noronha (kov)
Comment 2 2009-07-14 14:43:44 PDT
Comment on attachment 32651 [details] patch > + const gchar* uri = webkit_web_history_item_get_uri(item); > + if (g_strcmp0(g_uri_parse_scheme(uri), "file") == 0) { You are leaking the return of g_uri_parse_scheme here. > + static gchar* layoutTestString = g_strdup("/LayoutTests/"); > + static gchar* fileTestString = g_strdup("(file test):"); These are also leaked. There should be no need to g_strdup here. Just use the static strings instead? > + result = g_string_append(result, pos + strlen(layoutTestString)); I'd suggest using sizeof("/LayoutTests/") instead of strlen.
Jan Alonzo
Comment 3 2009-07-15 07:07:16 PDT
Created attachment 32782 [details] updated patch
Jan Alonzo
Comment 4 2009-07-15 07:08:19 PDT
(In reply to comment #3) > Created an attachment (id=32782) [details] > updated patch I made the updates except for the strlen -> sizeof change. May I ask why? Thanks.
Gustavo Noronha (kov)
Comment 5 2009-07-15 08:06:52 PDT
Comment on attachment 32782 [details] updated patch > + gchar* resultStr = g_string_free(result, FALSE); > + printf("%s", resultStr); > + g_free(resultStr); I would prefer the following: printf("%s", result->str); g_string_free(result, TRUE); But I am fine either way. If you feel like changing it, please do. r=me
Gustavo Noronha (kov)
Comment 6 2009-07-15 08:09:37 PDT
(In reply to comment #4) > (In reply to comment #3) > > Created an attachment (id=32782) [details] [details] > > updated patch > > I made the updates except for the strlen -> sizeof change. May I ask why? > Thanks. Err... forgot to answer this one. This is more of a nit-pick. A strlen will waste runtime - we already know the size of the string in build time, since it is static and won't change. sizeof is compile-time, so no time wasted counting chars. Notice that we would have to use sizeof on the actual static string, not on the variable. But, as I said, this is a nitpick, if you feel like using strlen, there should be no problem, since this is not performance-critical code.
Adam Barth
Comment 7 2009-07-16 16:11:43 PDT
Comment on attachment 32782 [details] updated patch Please post an updated patch with the nits addressed. Removing from commit queue.
Jan Alonzo
Comment 8 2009-07-17 18:17:59 PDT
Created attachment 32995 [details] Updated to use result->str instead of a temp var
Gustavo Noronha (kov)
Comment 9 2009-07-18 15:40:42 PDT
Comment on attachment 32995 [details] Updated to use result->str instead of a temp var r=me
Jan Alonzo
Comment 10 2009-07-18 15:55:07 PDT
(In reply to comment #9) > (From update of attachment 32995 [details]) > r=me Landed as http://trac.webkit.org/changeset/46096. Thanks.
Note You need to log in before you can comment on or make changes to this bug.