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.
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 #ifndef vm_ErrorObject_inl_h
8 #define vm_ErrorObject_inl_h
10 #include "vm/ErrorObject.h"
12 #include "jscntxt.h"
14 inline JSString *
15 js::ErrorObject::fileName(JSContext *cx) const
16 {
17 const HeapSlot &slot = getReservedSlotRef(FILENAME_SLOT);
18 return slot.isString() ? slot.toString() : cx->names().empty;
19 }
21 inline uint32_t
22 js::ErrorObject::lineNumber() const
23 {
24 const HeapSlot &slot = getReservedSlotRef(LINENUMBER_SLOT);
25 return slot.isInt32() ? slot.toInt32() : 0;
26 }
28 inline uint32_t
29 js::ErrorObject::columnNumber() const
30 {
31 const HeapSlot &slot = getReservedSlotRef(COLUMNNUMBER_SLOT);
32 return slot.isInt32() ? slot.toInt32() : 0;
33 }
35 inline JSString *
36 js::ErrorObject::stack(JSContext *cx) const
37 {
38 const HeapSlot &slot = getReservedSlotRef(STACK_SLOT);
39 if (slot.isString())
40 return slot.toString();
41 return cx->names().empty;
42 }
44 #endif /* vm_ErrorObject_inl_h */