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

Side by Side Diff: src/trusted/service_runtime/sel_main_chrome.c

Issue 10134056: Refactor the process of choosing validators. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebased, added a todo for NaClCopyCode Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/trusted/service_runtime/sel_main_chrome.h" 7 #include "native_client/src/trusted/service_runtime/sel_main_chrome.h"
8 8
9 #include "native_client/src/include/portability.h" 9 #include "native_client/src/include/portability.h"
10 #include "native_client/src/include/portability_io.h" 10 #include "native_client/src/include/portability_io.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 NaClSetCreateMemoryObjectFunc(args->create_memory_object_func); 135 NaClSetCreateMemoryObjectFunc(args->create_memory_object_func);
136 136
137 /* Inject the validation caching interface, if it exists. */ 137 /* Inject the validation caching interface, if it exists. */
138 nap->validation_cache = args->validation_cache; 138 nap->validation_cache = args->validation_cache;
139 139
140 #if NACL_WINDOWS 140 #if NACL_WINDOWS
141 if (args->broker_duplicate_handle_func != NULL) 141 if (args->broker_duplicate_handle_func != NULL)
142 NaClSetBrokerDuplicateHandleFunc(args->broker_duplicate_handle_func); 142 NaClSetBrokerDuplicateHandleFunc(args->broker_duplicate_handle_func);
143 #endif 143 #endif
144 144
145 if (getenv("NACL_DANGEROUS_USE_DFA_VALIDATOR") != NULL) {
146 fprintf(stderr, "DANGER! USING THE UNSTABLE DFA VALIDATOR!\n");
147 nap->enable_dfa_validator = 1;
148 }
149
150 NaClAppInitialDescriptorHookup(nap); 145 NaClAppInitialDescriptorHookup(nap);
151 146
152 /* 147 /*
153 * NACL_SERVICE_PORT_DESCRIPTOR and NACL_SERVICE_ADDRESS_DESCRIPTOR 148 * NACL_SERVICE_PORT_DESCRIPTOR and NACL_SERVICE_ADDRESS_DESCRIPTOR
154 * are 3 and 4. 149 * are 3 and 4.
155 */ 150 */
156 151
157 /* import IMC handle - used to be "-i" */ 152 /* import IMC handle - used to be "-i" */
158 NaClAddImcHandle(nap, args->imc_bootstrap_handle, export_addr_to); 153 NaClAddImcHandle(nap, args->imc_bootstrap_handle, export_addr_to);
159 154
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 if (LOAD_OK != errcode) { 334 if (LOAD_OK != errcode) {
340 NaClBlockIfCommandChannelExists(nap); 335 NaClBlockIfCommandChannelExists(nap);
341 } 336 }
342 337
343 done_ctor: 338 done_ctor:
344 339
345 NaClAllModulesFini(); 340 NaClAllModulesFini();
346 341
347 NaClExit(ret_code); 342 NaClExit(ret_code);
348 } 343 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698