gfx/layers/ipc/PLayer.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 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  * vim: sw=2 ts=8 et :
     3  */
     4 /* This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 include protocol PLayerTransaction;
    10 namespace mozilla {
    11 namespace layers {
    13 /**
    14  * PLayer represents a layer shared across thread contexts.
    15  */
    17 async protocol PLayer {
    18     manager PLayerTransaction;
    20     /**
    21      * OWNERSHIP MODEL
    22      *
    23      * Roughly speaking, the child side "actually owns" a Layer.  This
    24      * is because the parent side is the "shadow"; when the child
    25      * releases a Layer, the parent's shadow is no longer meaningful.
    26      *
    27      * To implement this model, the concrete PLayerParent keeps a
    28      * strong ref to its Layer, so the Layer's lifetime is bound to
    29      * the PLayerParent's.  Then, when the Layer's refcount hits 0 on
    30      * the child side, we send __delete__() from the child to parent.
    31      * The parent then releases its Layer, which results in the Layer
    32      * being deleted "soon" (usually immediately).
    33      */
    34 parent:
    35     async __delete__();
    36 };
    38 } // layers
    39 } // mozilla

mercurial