xpcom/reflect/xptcall/src/xptcprivate.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.

michael@0 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 /* All the xptcall private declarations - only include locally. */
michael@0 7
michael@0 8 #ifndef xptcprivate_h___
michael@0 9 #define xptcprivate_h___
michael@0 10
michael@0 11 #include "xptcall.h"
michael@0 12 #include "nsAutoPtr.h"
michael@0 13 #include "mozilla/Attributes.h"
michael@0 14
michael@0 15 class xptiInterfaceEntry;
michael@0 16
michael@0 17 #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
michael@0 18 #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
michael@0 19 #else
michael@0 20 #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t) = 0;
michael@0 21 #endif
michael@0 22
michael@0 23 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() = 0;
michael@0 24
michael@0 25 class nsIXPTCStubBase : public nsISupports
michael@0 26 {
michael@0 27 public:
michael@0 28 #include "xptcstubsdef.inc"
michael@0 29 };
michael@0 30
michael@0 31 #undef STUB_ENTRY
michael@0 32 #undef SENTINEL_ENTRY
michael@0 33
michael@0 34 #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
michael@0 35 #define STUB_ENTRY(n) NS_IMETHOD Stub##n();
michael@0 36 #else
michael@0 37 #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t);
michael@0 38 #endif
michael@0 39
michael@0 40 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n();
michael@0 41
michael@0 42 class nsXPTCStubBase MOZ_FINAL : public nsIXPTCStubBase
michael@0 43 {
michael@0 44 public:
michael@0 45 NS_DECL_ISUPPORTS_INHERITED
michael@0 46
michael@0 47 #include "xptcstubsdef.inc"
michael@0 48
michael@0 49 nsXPTCStubBase(nsIXPTCProxy* aOuter, xptiInterfaceEntry *aEntry) :
michael@0 50 mOuter(aOuter), mEntry(aEntry) { }
michael@0 51
michael@0 52 nsIXPTCProxy* mOuter;
michael@0 53 xptiInterfaceEntry* mEntry;
michael@0 54
michael@0 55 ~nsXPTCStubBase() { }
michael@0 56 };
michael@0 57
michael@0 58 #undef STUB_ENTRY
michael@0 59 #undef SENTINEL_ENTRY
michael@0 60
michael@0 61 #if defined(__clang__) || defined(__GNUC__)
michael@0 62 #define ATTRIBUTE_USED __attribute__ ((__used__))
michael@0 63 #else
michael@0 64 #define ATTRIBUTE_USED
michael@0 65 #endif
michael@0 66
michael@0 67 #endif /* xptcprivate_h___ */

mercurial