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

Unified Diff: tests/trusted_crash/osx_crash_forwarding/mach_crash_forwarding_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
« no previous file with comments | « tests/trusted_crash/osx_crash_filter/crash_filter_test.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/trusted_crash/osx_crash_forwarding/mach_crash_forwarding_test.c
diff --git a/tests/trusted_crash/osx_crash_forwarding/mach_crash_forwarding_test.c b/tests/trusted_crash/osx_crash_forwarding/mach_crash_forwarding_test.c
index 8971dcdd49fff17ac7564e75237022b4d986ceee..54d0befba5edc30978d29e559939eaba343f891e 100644
--- a/tests/trusted_crash/osx_crash_forwarding/mach_crash_forwarding_test.c
+++ b/tests/trusted_crash/osx_crash_forwarding/mach_crash_forwarding_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/osx/mach_exception_handler.h"
#include "native_client/src/trusted/service_runtime/sel_ldr.h"
@@ -117,7 +116,6 @@ void RegisterExceptionHandler(void) {
int main(int argc, char **argv) {
struct NaClApp app;
- struct GioMemoryFileSnapshot gio_file;
/* Register file-local handler first (so it ends up second in the chain). */
if (strcmp(argv[1], "unforwarded_trusted") != 0) {
@@ -154,11 +152,9 @@ int main(int argc, char **argv) {
NaClAllModulesInit();
- NaClFileNameForValgrind(argv[1]);
- CHECK(GioMemoryFileSnapshotCtor(&gio_file, argv[2]));
CHECK(NaClAppCtor(&app));
app.enable_exception_handling = 1;
- CHECK(NaClAppLoadFile((struct Gio *) &gio_file, &app) == LOAD_OK);
+ CHECK(NaClAppLoadFileFromFilename(&app, argv[2]) == LOAD_OK);
CHECK(NaClAppPrepareToLaunch(&app) == LOAD_OK);
CHECK(NaClCreateMainThread(&app, 0, NULL, NULL));
CHECK(NaClWaitForMainThreadToExit(&app) == 0);
« no previous file with comments | « tests/trusted_crash/osx_crash_filter/crash_filter_test.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698