Bug 92332 - Gather the duplicated timer code into CachedResource.
Summary: Gather the duplicated timer code into CachedResource.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kwang Yul Seo
URL:
Keywords:
Depends on: 91733 92443
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-25 22:08 PDT by Dongseong Hwang
Modified: 2012-07-27 01:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (14.33 KB, patch)
2012-07-25 22:10 PDT, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch (14.38 KB, patch)
2012-07-25 22:54 PDT, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch for landing (14.31 KB, patch)
2012-07-26 19:37 PDT, Kwang Yul Seo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongseong Hwang 2012-07-25 22:08:22 PDT
When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
start the timer to destroy decoded data. Those three classes have their own
timer.
Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
stop the timer. This change does not have any side effect because
CachedResource::didAddClient only stops the timer in this case.
Comment 1 Dongseong Hwang 2012-07-25 22:10:22 PDT
Created attachment 154537 [details]
Patch
Comment 2 Dongseong Hwang 2012-07-25 22:13:50 PDT
This is follow-up patch of Bug 91733.

Geoffrey said "I'd like to see more code sharing for destroying decoded data on a timer.", and I agreed.

Therefore, I did this patch.
Comment 3 Dongseong Hwang 2012-07-25 22:54:58 PDT
Created attachment 154547 [details]
Patch
Comment 4 Dongseong Hwang 2012-07-25 22:55:58 PDT
Changed the Changlog to add "Internal review by".
Comment 5 Kwang Yul Seo 2012-07-26 16:03:59 PDT
Comment on attachment 154547 [details]
Patch

Clearing flags on attachment: 154547

Committed r123808: <http://trac.webkit.org/changeset/123808>
Comment 6 Kwang Yul Seo 2012-07-26 16:04:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Review Bot 2012-07-26 18:30:03 PDT
Re-opened since this is blocked by 92443
Comment 8 Dongseong Hwang 2012-07-26 19:28:28 PDT
I'm sorry for my carelessness.

CachedScript::script() calls m_decodedDataDeletionTimer.startOneShot(0).

 466 void CachedResource::decodedDataDeletionTimerFired(Timer<CachedResource>*)
 467 {
 468     ASSERT(!hasClients());
 469     destroyDecodedData();
 470 }

So, ASSERTION can be failed.

I'll remove ASSERT and kseo will commit again.
Comment 9 Kwang Yul Seo 2012-07-26 19:37:28 PDT
Created attachment 154815 [details]
Patch for landing
Comment 10 WebKit Review Bot 2012-07-27 01:25:58 PDT
Comment on attachment 154815 [details]
Patch for landing

Clearing flags on attachment: 154815

Committed r123848: <http://trac.webkit.org/changeset/123848>
Comment 11 WebKit Review Bot 2012-07-27 01:26:02 PDT
All reviewed patches have been landed.  Closing bug.