js/xpconnect/idl/xpcjsid.idl

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 /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 [ptr] native const_nsID_ptr(const nsID);
    10 [builtinclass, scriptable, uuid(62883d14-4146-4039-94f5-a5e1e1a51a15)]
    11 interface nsIJSID : nsISupports
    12 {
    13     readonly attribute string  name;
    14     readonly attribute string  number;
    15     readonly attribute boolean valid;
    17     boolean equals(in nsIJSID other);
    18     string toString();
    20     [noscript] void initialize(in string idString);
    22     // returns a pointer to the internal nsID. this pointer is only valid
    23     // while the nsIJSID object remains alive!
    24     [notxpcom] const_nsID_ptr getID();
    25 };
    27 [builtinclass, scriptable, uuid(e76ec564-a080-4705-8609-384c755ec91e)]
    28 interface nsIJSIID : nsIJSID
    29 {
    30 };
    32 [builtinclass, scriptable, uuid(bf5eb086-9eaa-4694-aec3-fe4aac6119bd)]
    33 interface nsIJSCID : nsIJSID
    34 {
    35     [implicit_jscontext,optional_argc] jsval createInstance([optional] in jsval iid);
    36     [implicit_jscontext,optional_argc] jsval getService([optional] in jsval iid);
    37 };
    39 /* this goes into the C++ header verbatim. */
    40 %{ C++
    41 /********************************************************/
    42 // {F24A14F0-4FA1-11d3-9894-006008962422}
    43 #define NS_JS_ID_CID  \
    44 { 0xf24a14f0, 0x4fa1, 0x11d3, \
    45     { 0x98, 0x94, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } }
    46 %}

mercurial