OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 #ifdef _MSC_VER | 5 #ifdef _MSC_VER |
6 // Do not warn about use of std::copy with raw pointers. | 6 // Do not warn about use of std::copy with raw pointers. |
7 #pragma warning(disable : 4996) | 7 #pragma warning(disable : 4996) |
8 #endif | 8 #endif |
9 | 9 |
10 #include "ppapi/native_client/src/trusted/plugin/plugin.h" | 10 #include "ppapi/native_client/src/trusted/plugin/plugin.h" |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 ErrorInfo* error_info) { | 1153 ErrorInfo* error_info) { |
1154 PLUGIN_PRINTF(("Plugin::SetManifestObject(): manifest_json='%s'.\n", | 1154 PLUGIN_PRINTF(("Plugin::SetManifestObject(): manifest_json='%s'.\n", |
1155 manifest_json.c_str())); | 1155 manifest_json.c_str())); |
1156 if (error_info == NULL) | 1156 if (error_info == NULL) |
1157 return false; | 1157 return false; |
1158 // Determine whether lookups should use portable (i.e., pnacl versions) | 1158 // Determine whether lookups should use portable (i.e., pnacl versions) |
1159 // rather than platform-specific files. | 1159 // rather than platform-specific files. |
1160 bool is_pnacl = (mime_type() == kPnaclMIMEType); | 1160 bool is_pnacl = (mime_type() == kPnaclMIMEType); |
1161 bool nonsfi_mode_enabled = | 1161 bool nonsfi_mode_enabled = |
1162 PP_ToBool(nacl_interface_->IsNonSFIModeEnabled()); | 1162 PP_ToBool(nacl_interface_->IsNonSFIModeEnabled()); |
1163 bool pnacl_debug = GetNaClInterface()->NaClDebugStubEnabled(); | 1163 bool pnacl_debug = GetNaClInterface()->NaClDebugEnabledForURL( |
| 1164 manifest_base_url().c_str()); |
1164 const char* sandbox_isa = nacl_interface_->GetSandboxArch(); | 1165 const char* sandbox_isa = nacl_interface_->GetSandboxArch(); |
1165 nacl::scoped_ptr<JsonManifest> json_manifest( | 1166 nacl::scoped_ptr<JsonManifest> json_manifest( |
1166 new JsonManifest(url_util_, | 1167 new JsonManifest(url_util_, |
1167 manifest_base_url(), | 1168 manifest_base_url(), |
1168 (is_pnacl ? kPortableArch : sandbox_isa), | 1169 (is_pnacl ? kPortableArch : sandbox_isa), |
1169 nonsfi_mode_enabled, | 1170 nonsfi_mode_enabled, |
1170 pnacl_debug)); | 1171 pnacl_debug)); |
1171 if (!json_manifest->Init(manifest_json, error_info)) { | 1172 if (!json_manifest->Init(manifest_json, error_info)) { |
1172 return false; | 1173 return false; |
1173 } | 1174 } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 DCHECK(pp::Module::Get()->core()->IsMainThread()); | 1445 DCHECK(pp::Module::Get()->core()->IsMainThread()); |
1445 DCHECK(nacl_interface_); | 1446 DCHECK(nacl_interface_); |
1446 exit_status_ = exit_status; | 1447 exit_status_ = exit_status; |
1447 nacl_interface_->SetReadOnlyProperty(pp_instance(), | 1448 nacl_interface_->SetReadOnlyProperty(pp_instance(), |
1448 pp::Var("exitStatus").pp_var(), | 1449 pp::Var("exitStatus").pp_var(), |
1449 pp::Var(exit_status_).pp_var()); | 1450 pp::Var(exit_status_).pp_var()); |
1450 } | 1451 } |
1451 | 1452 |
1452 | 1453 |
1453 } // namespace plugin | 1454 } // namespace plugin |
OLD | NEW |