js/src/vm/DebuggerMemory.cpp

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: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  * vim: set ts=8 sts=4 et sw=4 tw=99:
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "vm/DebuggerMemory.h"
     9 namespace js {
    11 /* static */ bool
    12 DebuggerMemory::construct(JSContext *cx, unsigned argc, Value *vp)
    13 {
    14     JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_NO_CONSTRUCTOR,
    15                          "Debugger.Memory");
    16     return false;
    17 }
    19 /* static */ const Class DebuggerMemory::class_ = {
    20     "Memory",
    21     JSCLASS_HAS_PRIVATE | JSCLASS_IMPLEMENTS_BARRIERS |
    22     JSCLASS_HAS_RESERVED_SLOTS(JSSLOT_DEBUGGER_MEMORY_COUNT),
    24     JS_PropertyStub,       // addProperty
    25     JS_DeletePropertyStub, // delProperty
    26     JS_PropertyStub,       // getProperty
    27     JS_StrictPropertyStub, // setProperty
    28     JS_EnumerateStub,      // enumerate
    29     JS_ResolveStub,        // resolve
    30     JS_ConvertStub,        // convert
    32     nullptr, // finalize
    33     nullptr, // call
    34     nullptr, // hasInstance
    35     nullptr, // construct
    36     nullptr  // trace
    37 };
    39 /* static */ const JSPropertySpec DebuggerMemory::properties[] = {
    40     JS_PS_END
    41 };
    43 /* static */ const JSFunctionSpec DebuggerMemory::methods[] = {
    44     JS_FS_END
    45 };
    47 } /* namespace js */

mercurial