Bug 132539

Summary: Clear the JSString cache when under memory pressure.
Product: WebKit Reporter: Andreas Kling <kling>
Component: BindingsAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2014-05-03 19:09:06 PDT
The JSString cache is a luxury for fast mapping from StringImpl* to JSString*. We should drop it under memory pressure.
Comment 1 Andreas Kling 2014-05-03 19:09:38 PDT
Created attachment 230779 [details]
Patch
Comment 2 Sam Weinig 2014-05-03 19:18:38 PDT
Comment on attachment 230779 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=230779&action=review

> Source/WebCore/platform/MemoryPressureHandler.cpp:112
> +    {
> +        ReliefLogger log("Clearing JS string cache");
> +        JSDOMWindow::commonVM().stringCache.clear();
> +    }

We really need to find a way for this to be less of a layering violation haven.
Comment 3 WebKit Commit Bot 2014-05-03 20:22:33 PDT
Comment on attachment 230779 [details]
Patch

Clearing flags on attachment: 230779

Committed r168235: <http://trac.webkit.org/changeset/168235>
Comment 4 WebKit Commit Bot 2014-05-03 20:22:35 PDT
All reviewed patches have been landed.  Closing bug.