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.
michael@0 | 1 | // |
michael@0 | 2 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. |
michael@0 | 3 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 4 | // found in the LICENSE file. |
michael@0 | 5 | // |
michael@0 | 6 | |
michael@0 | 7 | #include "compiler/depgraph/DependencyGraph.h" |
michael@0 | 8 | |
michael@0 | 9 | // These methods do a breadth-first traversal through the graph and mark visited nodes. |
michael@0 | 10 | |
michael@0 | 11 | void TGraphNode::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 12 | { |
michael@0 | 13 | graphTraverser->markVisited(this); |
michael@0 | 14 | } |
michael@0 | 15 | |
michael@0 | 16 | void TGraphParentNode::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 17 | { |
michael@0 | 18 | TGraphNode::traverse(graphTraverser); |
michael@0 | 19 | |
michael@0 | 20 | graphTraverser->incrementDepth(); |
michael@0 | 21 | |
michael@0 | 22 | // Visit the parent node's children. |
michael@0 | 23 | for (TGraphNodeSet::const_iterator iter = mDependentNodes.begin(); |
michael@0 | 24 | iter != mDependentNodes.end(); |
michael@0 | 25 | ++iter) |
michael@0 | 26 | { |
michael@0 | 27 | TGraphNode* node = *iter; |
michael@0 | 28 | if (!graphTraverser->isVisited(node)) |
michael@0 | 29 | node->traverse(graphTraverser); |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | graphTraverser->decrementDepth(); |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | void TGraphArgument::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 36 | { |
michael@0 | 37 | graphTraverser->visitArgument(this); |
michael@0 | 38 | TGraphParentNode::traverse(graphTraverser); |
michael@0 | 39 | } |
michael@0 | 40 | |
michael@0 | 41 | void TGraphFunctionCall::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 42 | { |
michael@0 | 43 | graphTraverser->visitFunctionCall(this); |
michael@0 | 44 | TGraphParentNode::traverse(graphTraverser); |
michael@0 | 45 | } |
michael@0 | 46 | |
michael@0 | 47 | void TGraphSymbol::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 48 | { |
michael@0 | 49 | graphTraverser->visitSymbol(this); |
michael@0 | 50 | TGraphParentNode::traverse(graphTraverser); |
michael@0 | 51 | } |
michael@0 | 52 | |
michael@0 | 53 | void TGraphSelection::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 54 | { |
michael@0 | 55 | graphTraverser->visitSelection(this); |
michael@0 | 56 | TGraphNode::traverse(graphTraverser); |
michael@0 | 57 | } |
michael@0 | 58 | |
michael@0 | 59 | void TGraphLoop::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 60 | { |
michael@0 | 61 | graphTraverser->visitLoop(this); |
michael@0 | 62 | TGraphNode::traverse(graphTraverser); |
michael@0 | 63 | } |
michael@0 | 64 | |
michael@0 | 65 | void TGraphLogicalOp::traverse(TDependencyGraphTraverser* graphTraverser) |
michael@0 | 66 | { |
michael@0 | 67 | graphTraverser->visitLogicalOp(this); |
michael@0 | 68 | TGraphNode::traverse(graphTraverser); |
michael@0 | 69 | } |