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

Unified Diff: experimental/webtry/main.cpp

Issue 555993002: disable webtry seccmp on non-linux build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | experimental/webtry/seccomp_bpf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/webtry/main.cpp
diff --git a/experimental/webtry/main.cpp b/experimental/webtry/main.cpp
index 44f8aab70f4c450a48db6bd5ecb8ab90cb2e3542..4c527de16d34823167bf900c7740efd1e14f40fe 100644
--- a/experimental/webtry/main.cpp
+++ b/experimental/webtry/main.cpp
@@ -12,6 +12,7 @@
#include "SkStream.h"
#include "SkSurface.h"
+#
jcgregorio 2014/09/09 19:19:11 stray?
humper 2014/09/09 19:21:23 Acknowledged.
humper 2014/09/09 19:21:23 Done.
#include "seccomp_bpf.h"
__SK_FORCE_IMAGE_DECODER_LINKING;
@@ -23,6 +24,8 @@ DEFINE_string(source, "", "Filename of the source image.");
extern SkBitmap source;
static bool install_syscall_filter() {
+
+#ifdef SK_BUILD_FOR_UNIX
struct sock_filter filter[] = {
/* Grab the system call number. */
EXAMINE_SYSCALL,
@@ -64,6 +67,9 @@ failed:
fprintf(stderr, "SECCOMP_FILTER is not available. :(\n");
}
return false;
+#else
+ return true;
+#endif /* SK_BUILD_FOR_UNIX */
}
static void setLimits() {
« no previous file with comments | « no previous file | experimental/webtry/seccomp_bpf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698