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

Unified Diff: tests/custom_desc/desc_test_host.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 | « src/trusted/service_runtime/service_runtime.gyp ('k') | tests/faulted_thread_queue/faultqueue_test_host.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/custom_desc/desc_test_host.c
diff --git a/tests/custom_desc/desc_test_host.c b/tests/custom_desc/desc_test_host.c
index 841642f9ee89c5a3399f19dbceb55f6ad518015c..083612f767ed6860083e3064eca6484b5c59f6ff 100644
--- a/tests/custom_desc/desc_test_host.c
+++ b/tests/custom_desc/desc_test_host.c
@@ -6,14 +6,13 @@
#include <string.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_exit.h"
#include "native_client/src/shared/platform/nacl_log.h"
#include "native_client/src/trusted/desc/nacl_desc_custom.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/sel_ldr.h"
@@ -179,7 +178,6 @@ static struct NaClDesc *MakeExampleDesc(void) {
int main(int argc, char **argv) {
struct NaClApp app;
- struct GioMemoryFileSnapshot gio_file;
NaClHandleBootstrapArgs(&argc, &argv);
@@ -189,10 +187,8 @@ int main(int argc, char **argv) {
NaClAllModulesInit();
- NaClFileNameForValgrind(argv[1]);
- CHECK(GioMemoryFileSnapshotCtor(&gio_file, argv[1]));
CHECK(NaClAppCtor(&app));
- CHECK(NaClAppLoadFile((struct Gio *) &gio_file, &app) == LOAD_OK);
+ CHECK(NaClAppLoadFileFromFilename(&app, argv[1]) == LOAD_OK);
NaClAppInitialDescriptorHookup(&app);
g_nap = &app;
« no previous file with comments | « src/trusted/service_runtime/service_runtime.gyp ('k') | tests/faulted_thread_queue/faultqueue_test_host.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698