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_Recover_h
8 #define jit_Recover_h
10 #include "mozilla/Attributes.h"
12 #include "jit/Snapshots.h"
14 namespace js {
15 namespace jit {
17 class RResumePoint;
19 class RInstruction
20 {
21 public:
22 enum Opcode
23 {
24 Recover_ResumePoint = 0
25 };
27 virtual Opcode opcode() const = 0;
29 bool isResumePoint() const {
30 return opcode() == Recover_ResumePoint;
31 }
32 inline const RResumePoint *toResumePoint() const;
34 virtual uint32_t numOperands() const = 0;
36 static void readRecoverData(CompactBufferReader &reader, RInstructionStorage *raw);
37 };
39 class RResumePoint MOZ_FINAL : public RInstruction
40 {
41 private:
42 uint32_t pcOffset_; // Offset from script->code.
43 uint32_t numOperands_; // Number of slots.
45 friend class RInstruction;
46 RResumePoint(CompactBufferReader &reader);
48 public:
49 virtual Opcode opcode() const {
50 return Recover_ResumePoint;
51 }
53 uint32_t pcOffset() const {
54 return pcOffset_;
55 }
56 virtual uint32_t numOperands() const {
57 return numOperands_;
58 }
59 };
61 const RResumePoint *
62 RInstruction::toResumePoint() const
63 {
64 MOZ_ASSERT(isResumePoint());
65 return static_cast<const RResumePoint *>(this);
66 }
68 }
69 }
71 #endif /* jit_Recover_h */