Bug 43930 - Apparent error in FrameLoaderClientQt::createFrame
Summary: Apparent error in FrameLoaderClientQt::createFrame
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 13:50 PDT by Leo Yang
Modified: 2010-08-25 22:02 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2010-08-12 14:25 PDT, Leo Yang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Yang 2010-08-12 13:50:22 PDT
frameData.frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());

Apparent error: calling loadURLIntoChildFrame with child frame's loader.
Comment 1 Leo Yang 2010-08-12 14:25:01 PDT
Created attachment 64262 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2010-08-14 07:57:26 PDT
Comment on attachment 64262 [details]
Patch

How come this having been breaking anything?
Comment 3 Leo Yang 2010-08-16 07:21:14 PDT
(In reply to comment #2)
> (From update of attachment 64262 [details])
> How come this having been breaking anything?

Some logic in loadURLIntoChildFrame is unreachable. We can't run into the following if statement. And if we add some operations which are related with parent frame in loadURLIntoChildFrame in the future, it's buggy for qt porting.

 917     if (parentItem && parentItem->children().size() && isBackForwardLoadType(loadType)) {
 918         HistoryItem* childItem = parentItem->childItemWithTarget(childFrame->tree()->name());
 919         if (childItem) {
 920             // Use the original URL to ensure we get all the side-effects, such as
 921             // onLoad handlers, of any redirects that happened. An example of where
 922             // this is needed is Radar 3213556.
 923             workingURL = KURL(ParsedURLString, childItem->originalURLString());
 924             childLoadType = loadType;
 925             childFrame->loader()->history()->setProvisionalItem(childItem);
 926         }
 927     }
Comment 4 WebKit Commit Bot 2010-08-23 04:23:32 PDT
Comment on attachment 64262 [details]
Patch

Rejecting patch 64262 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20894 test cases.
media/video-preload.html -> crashed

Exiting early after 1 failures. 17255 tests run.
651.04s total testing time

17254 test cases (99%) succeeded
1 test case (<1%) crashed
36 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/3753576
Comment 5 Leo Yang 2010-08-25 07:16:44 PDT
(In reply to comment #4)
> (From update of attachment 64262 [details])
> Rejecting patch 64262 from commit-queue.
> 
> Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
> Running build-dumprendertree
> Compiling Java tests
> make: Nothing to be done for `default'.
> Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
> Testing 20894 test cases.
> media/video-preload.html -> crashed
> 
> Exiting early after 1 failures. 17255 tests run.
> 651.04s total testing time
> 
> 17254 test cases (99%) succeeded
> 1 test case (<1%) crashed
> 36 test cases (<1%) had stderr output
> 
> Full output: http://queues.webkit.org/results/3753576

Code changes in the patch are only related to QT port. I tested using QtTestBrowser, it works fine for media/video-preload.html. So is it false positive?
Comment 6 Eric Seidel (no email) 2010-08-25 09:48:02 PDT
Comment on attachment 64262 [details]
Patch

The media tests a very flaky on leopard due to a CoreVideo bug.
Comment 7 Leo Yang 2010-08-25 11:16:40 PDT
(In reply to comment #6)
> (From update of attachment 64262 [details])
> The media tests a very flaky on leopard due to a CoreVideo bug.

Can someone who has commit access help land this patch?
Comment 8 Eric Seidel (no email) 2010-08-25 11:17:18 PDT
The cq will land it shortly.
Comment 9 WebKit Commit Bot 2010-08-25 11:31:59 PDT
Comment on attachment 64262 [details]
Patch

Clearing flags on attachment: 64262

Committed r66030: <http://trac.webkit.org/changeset/66030>
Comment 10 WebKit Commit Bot 2010-08-25 11:32:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Antonio Gomes 2010-08-25 22:02:16 PDT
-    frameData.frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
+    m_frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
 

That is a great catch!

Did not it fixed anything? If not, no unit tests or regression tests added? :-(

It could happen to be broken again...