diff options
author | brucedawson <brucedawson@chromium.org> | 2014-12-11 15:08:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-11 23:09:07 +0000 |
commit | 4471c6a4b951804d211afb269d064a7cd4753acf (patch) | |
tree | f2fde464e3b02fe53674727c4c243d9917e38c0c | |
parent | 1897d5d8f32fd78a9f50305149844aa417f3a0cb (diff) | |
download | chromium_src-4471c6a4b951804d211afb269d064a7cd4753acf.zip chromium_src-4471c6a4b951804d211afb269d064a7cd4753acf.tar.gz chromium_src-4471c6a4b951804d211afb269d064a7cd4753acf.tar.bz2 |
Renumbering sandbox policy actions to fix bug found by VC++'s /analyze.
Warning was:
src\sandbox\win\src\policy_engine_processor.cc(81) : warning C6313:
Incorrect operator: zero-valued flag cannot be tested with bitwise-and.
This change should have no effect because the kStopOnErrors policy is
never requested.
BUG=427616
Review URL: https://codereview.chromium.org/789543004
Cr-Commit-Position: refs/heads/master@{#307988}
-rw-r--r-- | sandbox/win/src/policy_engine_processor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sandbox/win/src/policy_engine_processor.h b/sandbox/win/src/policy_engine_processor.h index 85c999e..9e416bd 100644 --- a/sandbox/win/src/policy_engine_processor.h +++ b/sandbox/win/src/policy_engine_processor.h @@ -63,18 +63,18 @@ enum PolicyResult { }; // Policy evaluation flags -// TODO(cpu): implement the options 0 & 4. +// TODO(cpu): implement the options kStopOnErrors & kRankedEval. // // Stop evaluating as soon as an error is encountered. -const uint32 kStopOnErrors = 0; +const uint32 kStopOnErrors = 1; // Ignore all non fatal opcode evaluation errors. -const uint32 kIgnoreErrors = 1; +const uint32 kIgnoreErrors = 2; // Short-circuit evaluation: Only evaluate until opcode group that // evaluated to true has been found. -const uint32 kShortEval = 2; +const uint32 kShortEval = 4; // Discussed briefly at the policy design meeting. It will evaluate // all rules and then return the 'best' rule that evaluated true. -const uint32 kRankedEval = 4; +const uint32 kRankedEval = 8; // This class evaluates a policy-opcode stream given the memory where the // opcodes are and an input 'parameter set'. |