Bug 82099 - Simplify setting loading state in DocumentLoader
Summary: Simplify setting loading state in DocumentLoader
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nate Chapin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-23 16:01 PDT by Nate Chapin
Modified: 2012-03-26 13:34 PDT (History)
3 users (show)

See Also:


Attachments
patch (9.96 KB, patch)
2012-03-23 16:26 PDT, Nate Chapin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Chapin 2012-03-23 16:01:31 PDT
DocumentLoader::isLoading() just returns m_loading, but the logic for setting m_loading is circuitous to say the least.  It gets set consistently by some functions (e.g., addSubresourceLoader), but it also is set by updateLoading(), which sets it based on FrameLoader::isLoading(), which is based on a bunch of different DocumentLoader functions.

I've got a patch that greatly simplifies this logic that I will post shortly.  Then again, I might be stepping on a landmine :)
Comment 1 Nate Chapin 2012-03-23 16:26:34 PDT
Created attachment 133585 [details]
patch
Comment 2 Adam Barth 2012-03-26 13:19:20 PDT
Comment on attachment 133585 [details]
patch

This looks great.
Comment 3 WebKit Review Bot 2012-03-26 13:34:18 PDT
Comment on attachment 133585 [details]
patch

Clearing flags on attachment: 133585

Committed r112144: <http://trac.webkit.org/changeset/112144>
Comment 4 WebKit Review Bot 2012-03-26 13:34:22 PDT
All reviewed patches have been landed.  Closing bug.