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

Unified Diff: tests/trusted_crash/osx_crash_filter/crash_filter_test.c

Issue 12226119: Factor out duplicated GioMemoryFileSnapshotCtor() + NaClAppLoadFile() calls (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 10 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
Index: tests/trusted_crash/osx_crash_filter/crash_filter_test.c
diff --git a/tests/trusted_crash/osx_crash_filter/crash_filter_test.c b/tests/trusted_crash/osx_crash_filter/crash_filter_test.c
index 4591fba46e34d4ce8977a9c894b1fd62284da322..ee6906f37c237b4be6762adb4f440a0d81bf1490 100644
--- a/tests/trusted_crash/osx_crash_filter/crash_filter_test.c
+++ b/tests/trusted_crash/osx_crash_filter/crash_filter_test.c
@@ -9,12 +9,11 @@
#include <mach/task.h>
#include <pthread.h>
-#include "native_client/src/shared/gio/gio.h"
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/src/shared/platform/nacl_log.h"
+#include "native_client/src/trusted/service_runtime/load_file.h"
#include "native_client/src/trusted/service_runtime/nacl_all_modules.h"
#include "native_client/src/trusted/service_runtime/nacl_app.h"
-#include "native_client/src/trusted/service_runtime/nacl_valgrind_hooks.h"
#include "native_client/src/trusted/service_runtime/osx/crash_filter.h"
#include "native_client/src/trusted/service_runtime/sel_ldr.h"
@@ -118,7 +117,6 @@ void RegisterExceptionHandler(void) {
int main(int argc, char **argv) {
struct NaClApp app;
- struct GioMemoryFileSnapshot gio_file;
if (argc == 2 && strcmp(argv[1], "early_trusted") == 0) {
g_expect_untrusted = 0;
@@ -141,10 +139,8 @@ int main(int argc, char **argv) {
NaClAllModulesInit();
- NaClFileNameForValgrind(argv[1]);
- CHECK(GioMemoryFileSnapshotCtor(&gio_file, argv[2]));
CHECK(NaClAppCtor(&app));
- CHECK(NaClAppLoadFile((struct Gio *) &gio_file, &app) == LOAD_OK);
+ CHECK(NaClAppLoadFileFromFilename(&app, argv[2]) == LOAD_OK);
CHECK(NaClAppPrepareToLaunch(&app) == LOAD_OK);
RegisterExceptionHandler();

Powered by Google App Engine
This is Rietveld 408576698