Bug 132539 - Clear the JSString cache when under memory pressure.
Summary: Clear the JSString cache when under memory pressure.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Depends on:
Reported: 2014-05-03 19:09 PDT by Andreas Kling
Modified: 2014-05-03 20:22 PDT (History)
1 user (show)

See Also:

Patch (1.54 KB, patch)
2014-05-03 19:09 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 Sam Weinig 2014-05-03 19:18:38 PDT
Comment on attachment 230779 [details]

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]

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.