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

Side by Side Diff: ports/nacl-spawn/nacl_spawn.cc

Issue 1130003002: Fixing NACL_DEBUG=1 for nacl-spawn. (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Native Client Authors. All rights reserved. 1 // Copyright (c) 2014 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Emulates spawning/waiting process by asking JavaScript to do so. 5 // Emulates spawning/waiting process by asking JavaScript to do so.
6 6
7 // Include quoted spawn.h first so we can build in the presence of an installed 7 // Include quoted spawn.h first so we can build in the presence of an installed
8 // copy of nacl-spawn. 8 // copy of nacl-spawn.
9 #define IN_NACL_SPAWN_CC 9 #define IN_NACL_SPAWN_CC
10 #include "spawn.h" 10 #include "spawn.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 char buf[64]; 231 char buf[64];
232 sprintf(buf, "%lld", id); 232 sprintf(buf, "%lld", id);
233 return buf; 233 return buf;
234 } 234 }
235 235
236 static bool GetBool(struct PP_Var dict_var, const char* key) { 236 static bool GetBool(struct PP_Var dict_var, const char* key) {
237 struct PP_Var value_var; 237 struct PP_Var value_var;
238 if (!VarDictionaryHasKey(dict_var, key, &value_var)) { 238 if (!VarDictionaryHasKey(dict_var, key, &value_var)) {
239 return -1; 239 return -1;
240 } 240 }
241 assert(value_var.type == PP_BOOL); 241 assert(value_var.type == PP_VARTYPE_BOOL);
242 bool value = value_var.value.as_bool; 242 bool value = value_var.value.as_bool;
243 return value; 243 return value;
244 } 244 }
245 245
246 static void MountLocalFs(struct PP_Var mount_data) { 246 static void MountLocalFs(struct PP_Var mount_data) {
247 bool available = GetBool(mount_data, "available"); 247 bool available = GetBool(mount_data, "available");
248 248
249 if (!available) { 249 if (!available) {
250 return; 250 return;
251 } else { 251 } else {
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 return spawnve_impl(P_OVERLAY, path, argv, envp); 1396 return spawnve_impl(P_OVERLAY, path, argv, envp);
1397 } 1397 }
1398 1398
1399 int execlpe(const char *path, const char *arg, ...) { /* char* const envp[] */ 1399 int execlpe(const char *path, const char *arg, ...) { /* char* const envp[] */
1400 VARG_TO_ARGV_ENVP; 1400 VARG_TO_ARGV_ENVP;
1401 // TODO(bradnelson): Limit path resolution to 'p' variants. 1401 // TODO(bradnelson): Limit path resolution to 'p' variants.
1402 return spawnve_impl(P_OVERLAY, path, argv, envp); 1402 return spawnve_impl(P_OVERLAY, path, argv, envp);
1403 } 1403 }
1404 1404
1405 }; // extern "C" 1405 }; // extern "C"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698