dom/ipc/PCOMContentPermissionRequestChild.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef PCOMContentPermissionRequestChild_h
     6 #define PCOMContentPermissionRequestChild_h
     8 #include "mozilla/dom/PContentPermissionRequestChild.h"
     9 // Microsoft's API Name hackery sucks
    10 // XXXbz Doing this in a header is a gigantic footgun.  See
    11 // https://bugzilla.mozilla.org/show_bug.cgi?id=932421#c3 for why.
    12 #undef CreateEvent
    14 /*
    15   PContentPermissionRequestChild implementations also are
    16   XPCOM objects.  Addref() is called on their implementation
    17   before SendPContentPermissionRequestConstructor is called.
    18   When Dealloc is called, IPDLRelease() is called.
    19   Implementations of this method are expected to call
    20   Release() on themselves.  See Bug 594261 for more
    21   information.
    22  */
    23 class PCOMContentPermissionRequestChild : public mozilla::dom::PContentPermissionRequestChild {
    24 public:
    25   virtual void IPDLRelease() = 0;
    26 #ifdef DEBUG
    27   PCOMContentPermissionRequestChild() : mIPCOpen(false) {}
    28   virtual ~PCOMContentPermissionRequestChild() {
    29     // mIPCOpen is set to true in TabChild::SendPContentPermissionRequestConstructor
    30     // and set to false in TabChild::DeallocPContentPermissionRequest
    31     MOZ_ASSERT(!mIPCOpen, "Protocol must not be open when PCOMContentPermissionRequestChild is destroyed.");
    32   }
    33   bool mIPCOpen;
    34 #endif /* DEBUG */
    35 };
    37 #endif

mercurial