Bug 22394 - Be more eager in destroying script decoded data
Summary: Be more eager in destroying script decoded data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-11-20 21:41 PST by Sam Weinig
Modified: 2008-11-21 15:18 PST (History)
1 user (show)

See Also:


Attachments
patch (20.79 KB, patch)
2008-11-20 21:43 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch 2 - CachedScriptSourceProvider (13.95 KB, patch)
2008-11-20 23:48 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch 3 - Destroy decoded data on allClientsRemoved (1.58 KB, patch)
2008-11-21 11:40 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
patch 4 - Destroy decoded data on a zero-delay timer (2.25 KB, patch)
2008-11-21 14:43 PST, Sam Weinig
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2008-11-20 21:41:23 PST
We should be more eager about destroying it as re-creating it is cheap.
Comment 1 Sam Weinig 2008-11-20 21:43:09 PST
Created attachment 25337 [details]
patch
Comment 2 Geoffrey Garen 2008-11-20 21:46:34 PST
Comment on attachment 25337 [details]
patch

r=me
Comment 3 Sam Weinig 2008-11-20 21:51:41 PST
Comment on attachment 25337 [details]
patch

First patch landed in r38654.
Comment 4 Sam Weinig 2008-11-20 23:48:18 PST
Created attachment 25341 [details]
Patch 2 - CachedScriptSourceProvider
Comment 5 Geoffrey Garen 2008-11-21 10:20:05 PST
Comment on attachment 25341 [details]
Patch 2 - CachedScriptSourceProvider

> +        return JSC::SourceCode(CachedScriptSourceProvider::create(cachedScript), 1);

No need for the "1" here -- it's automatic.

Isn't there some .bkl action that needs fixing up, too?

r=me
Comment 6 Sam Weinig 2008-11-21 10:45:03 PST
Comment on attachment 25341 [details]
Patch 2 - CachedScriptSourceProvider

Second patch landed in r38664.
Comment 7 Sam Weinig 2008-11-21 11:40:49 PST
Created attachment 25359 [details]
Patch 3 - Destroy decoded data on allClientsRemoved
Comment 8 Sam Weinig 2008-11-21 13:40:57 PST
Comment on attachment 25359 [details]
Patch 3 - Destroy decoded data on allClientsRemoved

Third patch landed in r38676.
Comment 9 Sam Weinig 2008-11-21 14:43:29 PST
Created attachment 25363 [details]
patch 4 - Destroy decoded data on a zero-delay timer

This approach adds a zero-delay timer after decoding script data to destroy it.  This should handle all cases of avoiding re-decoding data shortly after initial re-decode.
Comment 10 Sam Weinig 2008-11-21 14:45:26 PST
Comment on attachment 25363 [details]
patch 4 - Destroy decoded data on a zero-delay timer

r=geoff garen
Comment 11 Sam Weinig 2008-11-21 15:16:37 PST
<rdar://problem/6393888>
Comment 12 Sam Weinig 2008-11-21 15:18:20 PST
Last patch landed in r38679.