Sat, 03 Jan 2015 20:18:00 +0100
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: IDL; tab-width: 4; 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 | /** |
michael@0 | 7 | * Root idl declarations to be used by all. |
michael@0 | 8 | */ |
michael@0 | 9 | |
michael@0 | 10 | %{C++ |
michael@0 | 11 | |
michael@0 | 12 | #include "nscore.h" |
michael@0 | 13 | typedef int64_t PRTime; |
michael@0 | 14 | |
michael@0 | 15 | /* |
michael@0 | 16 | * Forward declarations for new string types |
michael@0 | 17 | */ |
michael@0 | 18 | class nsAString; |
michael@0 | 19 | class nsACString; |
michael@0 | 20 | |
michael@0 | 21 | /* |
michael@0 | 22 | * Start commenting out the C++ versions of the below in the output header |
michael@0 | 23 | */ |
michael@0 | 24 | #if 0 |
michael@0 | 25 | %} |
michael@0 | 26 | |
michael@0 | 27 | typedef boolean bool ; |
michael@0 | 28 | typedef octet uint8_t ; |
michael@0 | 29 | typedef unsigned short uint16_t ; |
michael@0 | 30 | typedef unsigned short char16_t; |
michael@0 | 31 | typedef unsigned long uint32_t ; |
michael@0 | 32 | typedef unsigned long long uint64_t ; |
michael@0 | 33 | typedef long long PRTime ; |
michael@0 | 34 | typedef short int16_t ; |
michael@0 | 35 | typedef long int32_t ; |
michael@0 | 36 | typedef long long int64_t ; |
michael@0 | 37 | |
michael@0 | 38 | typedef unsigned long nsrefcnt ; |
michael@0 | 39 | typedef unsigned long nsresult ; |
michael@0 | 40 | |
michael@0 | 41 | // XXX need this built into xpidl compiler so that it's really size_t or size_t |
michael@0 | 42 | // and it's scriptable: |
michael@0 | 43 | typedef unsigned long size_t; |
michael@0 | 44 | |
michael@0 | 45 | [ptr] native voidPtr(void); |
michael@0 | 46 | [ptr] native charPtr(char); |
michael@0 | 47 | [ptr] native unicharPtr(char16_t); |
michael@0 | 48 | |
michael@0 | 49 | [ref, nsid] native nsIDRef(nsID); |
michael@0 | 50 | [ref, nsid] native nsIIDRef(nsIID); |
michael@0 | 51 | [ref, nsid] native nsCIDRef(nsCID); |
michael@0 | 52 | |
michael@0 | 53 | [ptr, nsid] native nsIDPtr(nsID); |
michael@0 | 54 | [ptr, nsid] native nsIIDPtr(nsIID); |
michael@0 | 55 | [ptr, nsid] native nsCIDPtr(nsCID); |
michael@0 | 56 | |
michael@0 | 57 | // NOTE: Be careful in using the following 3 types. The *Ref and *Ptr variants |
michael@0 | 58 | // are more commonly used (and better supported). Those variants require |
michael@0 | 59 | // nsMemory alloc'd copies when used as 'out' params while these types do not. |
michael@0 | 60 | // However, currently these types can not be used for 'in' params. And, methods |
michael@0 | 61 | // that use them as 'out' params *must* be declared [notxpcom] (with an explicit |
michael@0 | 62 | // return type of nsresult). This makes such methods implicitly not scriptable. |
michael@0 | 63 | // Use of these types in methods without a [notxpcom] declaration will cause |
michael@0 | 64 | // the xpidl compiler to raise an error. |
michael@0 | 65 | // See: http://bugzilla.mozilla.org/show_bug.cgi?id=93792 |
michael@0 | 66 | |
michael@0 | 67 | [nsid] native nsIID(nsIID); |
michael@0 | 68 | [nsid] native nsID(nsID); |
michael@0 | 69 | [nsid] native nsCID(nsCID); |
michael@0 | 70 | |
michael@0 | 71 | [ptr] native nsQIResult(void); |
michael@0 | 72 | |
michael@0 | 73 | [ref, domstring] native DOMString(ignored); |
michael@0 | 74 | [ref, domstring] native DOMStringRef(ignored); |
michael@0 | 75 | [ptr, domstring] native DOMStringPtr(ignored); |
michael@0 | 76 | |
michael@0 | 77 | [ref, utf8string] native AUTF8String(ignored); |
michael@0 | 78 | [ref, utf8string] native AUTF8StringRef(ignored); |
michael@0 | 79 | [ptr, utf8string] native AUTF8StringPtr(ignored); |
michael@0 | 80 | |
michael@0 | 81 | [ref, cstring] native ACString(ignored); |
michael@0 | 82 | [ref, cstring] native ACStringRef(ignored); |
michael@0 | 83 | [ptr, cstring] native ACStringPtr(ignored); |
michael@0 | 84 | |
michael@0 | 85 | [ref, astring] native AString(ignored); |
michael@0 | 86 | [ref, astring] native AStringRef(ignored); |
michael@0 | 87 | [ptr, astring] native AStringPtr(ignored); |
michael@0 | 88 | |
michael@0 | 89 | [ref, jsval] native jsval(jsval); |
michael@0 | 90 | native jsid(jsid); |
michael@0 | 91 | |
michael@0 | 92 | %{C++ |
michael@0 | 93 | /* |
michael@0 | 94 | * End commenting out the C++ versions of the above in the output header |
michael@0 | 95 | */ |
michael@0 | 96 | #endif |
michael@0 | 97 | %} |