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 jit_JitCommon_h
8 #define jit_JitCommon_h
10 // Various macros used by all JITs, including YARR.
12 #ifdef JS_ARM_SIMULATOR
13 #include "jit/arm/Simulator-arm.h"
15 // Call into cross-jitted code by following the ABI of the simulated architecture.
16 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
17 (js::jit::Simulator::Current()->call( \
18 JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 8, p0, p1, p2, p3, p4, p5, p6, p7) & 0xffffffff)
20 #define CALL_GENERATED_YARR_CODE3(entry, p0, p1, p2) \
21 js::jit::Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 3, p0, p1, p2)
23 #define CALL_GENERATED_YARR_CODE4(entry, p0, p1, p2, p3) \
24 js::jit::Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 4, p0, p1, p2, p3)
26 #define CALL_GENERATED_ASMJS(entry, p0, p1) \
27 (Simulator::Current()->call(JS_FUNC_TO_DATA_PTR(uint8_t *, entry), 2, p0, p1) & 0xffffffff)
29 #else
31 // Call into jitted code by following the ABI of the native architecture.
32 #define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7) \
33 entry(p0, p1, p2, p3, p4, p5, p6, p7)
35 #define CALL_GENERATED_YARR_CODE3(entry, p0, p1, p2) \
36 entry(p0, p1, p2)
38 #define CALL_GENERATED_YARR_CODE4(entry, p0, p1, p2, p3) \
39 entry(p0, p1, p2, p3)
41 #define CALL_GENERATED_ASMJS(entry, p0, p1) \
42 entry(p0, p1)
44 #endif
46 #endif // jit_JitCommon_h