dom/asmjscache/PAsmJSCacheEntry.ipdl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 include protocol PContent;
     7 using mozilla::dom::asmjscache::Metadata from "mozilla/dom/asmjscache/AsmJSCache.h";
     9 namespace mozilla {
    10 namespace dom {
    11 namespace asmjscache {
    13 protocol PAsmJSCacheEntry
    14 {
    15   manager PContent;
    17   // When the cache is opened to read, the parent process sends over the
    18   // origin's Metadata so the child process can select the cache entry to open
    19   // (based on hash) and notify the parent (via SelectCacheFileToRead).
    20 child:
    21   OnOpenMetadataForRead(Metadata metadata);
    22 parent:
    23   SelectCacheFileToRead(uint32_t moduleIndex);
    24   CacheMiss();
    26 child:
    27   // Once the cache file has been opened, the child is notified and sent an
    28   // open file descriptor.
    29   OnOpenCacheFile(int64_t fileSize, FileDescriptor fileDesc);
    31 both:
    32   __delete__();
    33 };
    35 } // namespace asmjscache
    36 } // namespace dom
    37 } // namespace mozilla

mercurial