Bug 86636 - Expose memory usage statistics to web platform
Summary: Expose memory usage statistics to web platform
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 94534 80444 80787
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-16 08:41 PDT by Tony Gentilcore
Modified: 2018-09-02 16:10 PDT (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Gentilcore 2012-05-16 08:41:54 PDT
This is a cover-bug to track MemoryInfo work.

performance.memory and console.memory both provide access to the MemoryInfo interface as follows:
> performance.memory
  MemoryInfo
    jsHeapSizeLimit: 767557632
    totalJSHeapSize: 8244736
    usedJSHeapSize: 3065200

Currently access to this information is disabled by default. Chromium allows it to be enabled with the --enable-memory-info command line flag and apparently at least one organization has enabled that flag by default for its users.

It is not enabled by default due to privacy considerations. Specifically, exposing memory usage could reveal information about the user across domains (such as whether they are signed-in). That being said, because of how easy it is to leak memory on the web, it would be quite valuable for web apps to be able to monitor memory usage for real users.

So it is worth determining whether mitigation strategies such as the one in bug 80444 can make this information safe for the web.
- If it can't be made safe: we should rip out the interface and relegate memory usage statistics to the Inspector.
- If it can be made safe: we should make those changes, publish a specification (public-web-perf is interested), only expose it at a single point (console or performance), and vendor prefix the interface (webkitMemory).
Comment 1 Ryosuke Niwa 2016-05-02 22:30:21 PDT
<rdar://problem/25691465>