gfx/angle/src/compiler/preprocessor/Macro.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 //
     2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
     3 // Use of this source code is governed by a BSD-style license that can be
     4 // found in the LICENSE file.
     5 //
     7 #ifndef COMPILER_PREPROCESSOR_MACRO_H_
     8 #define COMPILER_PREPROCESSOR_MACRO_H_
    10 #include <map>
    11 #include <string>
    12 #include <vector>
    14 namespace pp
    15 {
    17 struct Token;
    19 struct Macro
    20 {
    21     enum Type
    22     {
    23         kTypeObj,
    24         kTypeFunc
    25     };
    26     typedef std::vector<std::string> Parameters;
    27     typedef std::vector<Token> Replacements;
    29     Macro() : predefined(false), disabled(false), type(kTypeObj) { }
    30     bool equals(const Macro& other) const;
    32     bool predefined;
    33     mutable bool disabled;
    35     Type type;
    36     std::string name;
    37     Parameters parameters;
    38     Replacements replacements;
    39 };
    41 typedef std::map<std::string, Macro> MacroSet;
    43 }  // namespace pp
    44 #endif  // COMPILER_PREPROCESSOR_MACRO_H_

mercurial