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_C1Spewer_h
8 #define jit_C1Spewer_h
10 #ifdef DEBUG
12 #include "NamespaceImports.h"
14 #include "js/RootingAPI.h"
16 namespace js {
17 namespace jit {
19 class MDefinition;
20 class MInstruction;
21 class MBasicBlock;
22 class MIRGraph;
23 class LinearScanAllocator;
24 class LInstruction;
26 class C1Spewer
27 {
28 MIRGraph *graph;
29 HandleScript script;
30 FILE *spewout_;
32 public:
33 C1Spewer()
34 : graph(nullptr), script(NullPtr()), spewout_(nullptr)
35 { }
37 bool init(const char *path);
38 void beginFunction(MIRGraph *graph, HandleScript script);
39 void spewPass(const char *pass);
40 void spewIntervals(const char *pass, LinearScanAllocator *regalloc);
41 void endFunction();
42 void finish();
44 private:
45 void spewPass(FILE *fp, MBasicBlock *block);
46 void spewIntervals(FILE *fp, LinearScanAllocator *regalloc, LInstruction *ins, size_t &nextId);
47 void spewIntervals(FILE *fp, MBasicBlock *block, LinearScanAllocator *regalloc, size_t &nextId);
48 };
50 } // namespace jit
51 } // namespace js
53 #endif /* DEBUG */
55 #endif /* jit_C1Spewer_h */