Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: sandbox/linux/seccomp-bpf/codegen.cc

Issue 576673003: Decouple CodeGen from ErrorCode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and fix comment Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/seccomp-bpf/codegen.h ('k') | sandbox/linux/seccomp-bpf/codegen_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/codegen.cc
diff --git a/sandbox/linux/seccomp-bpf/codegen.cc b/sandbox/linux/seccomp-bpf/codegen.cc
index 47ba39713791e46feee1e1cc69ec511b1f2b2ffa..aa47155fce7a7178c4ed1948ccf71dd0a5b98884 100644
--- a/sandbox/linux/seccomp-bpf/codegen.cc
+++ b/sandbox/linux/seccomp-bpf/codegen.cc
@@ -172,17 +172,6 @@ Instruction* CodeGen::MakeInstruction(uint16_t code,
}
}
-Instruction* CodeGen::MakeInstruction(uint16_t code, const ErrorCode& err) {
- if (BPF_CLASS(code) != BPF_RET) {
- SANDBOX_DIE("ErrorCodes can only be used in return expressions");
- }
- if (err.error_type_ != ErrorCode::ET_SIMPLE &&
- err.error_type_ != ErrorCode::ET_TRAP) {
- SANDBOX_DIE("ErrorCode is not suitable for returning from a BPF program");
- }
- return MakeInstruction(code, err.err_);
-}
-
Instruction* CodeGen::MakeInstruction(uint16_t code,
uint32_t k,
Instruction* jt,
« no previous file with comments | « sandbox/linux/seccomp-bpf/codegen.h ('k') | sandbox/linux/seccomp-bpf/codegen_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698