Bug 86636

Summary: Expose memory usage statistics to web platform
Product: WebKit Reporter: Tony Gentilcore <tonyg>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: abarth, ap, fpizlo, ggaren, jkjiang, koivisto, laszlo.gombos, nblochberger2, paulirish, rniwa, syoichi, yurys
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 94534, 80444, 80787    
Bug Blocks:    

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>