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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 ErrorInfo* error_info) { | 1146 ErrorInfo* error_info) { |
1147 PLUGIN_PRINTF(("Plugin::SetManifestObject(): manifest_json='%s'.\n", | 1147 PLUGIN_PRINTF(("Plugin::SetManifestObject(): manifest_json='%s'.\n", |
1148 manifest_json.c_str())); | 1148 manifest_json.c_str())); |
1149 if (error_info == NULL) | 1149 if (error_info == NULL) |
1150 return false; | 1150 return false; |
1151 // Determine whether lookups should use portable (i.e., pnacl versions) | 1151 // Determine whether lookups should use portable (i.e., pnacl versions) |
1152 // rather than platform-specific files. | 1152 // rather than platform-specific files. |
1153 bool is_pnacl = (mime_type() == kPnaclMIMEType); | 1153 bool is_pnacl = (mime_type() == kPnaclMIMEType); |
1154 bool nonsfi_mode_enabled = | 1154 bool nonsfi_mode_enabled = |
1155 PP_ToBool(nacl_interface_->IsNonSFIModeEnabled()); | 1155 PP_ToBool(nacl_interface_->IsNonSFIModeEnabled()); |
1156 bool pnacl_debug = GetNaClInterface()->NaClDebugStubEnabled(); | 1156 bool pnacl_debug = GetNaClInterface()->NaClDebugEnabledForURL( |
| 1157 manifest_base_url().c_str()); |
1157 const char* sandbox_isa = nacl_interface_->GetSandboxArch(); | 1158 const char* sandbox_isa = nacl_interface_->GetSandboxArch(); |
1158 nacl::scoped_ptr<JsonManifest> json_manifest( | 1159 nacl::scoped_ptr<JsonManifest> json_manifest( |
1159 new JsonManifest(url_util_, | 1160 new JsonManifest(url_util_, |
1160 manifest_base_url(), | 1161 manifest_base_url(), |
1161 (is_pnacl ? kPortableArch : sandbox_isa), | 1162 (is_pnacl ? kPortableArch : sandbox_isa), |
1162 nonsfi_mode_enabled, | 1163 nonsfi_mode_enabled, |
1163 pnacl_debug)); | 1164 pnacl_debug)); |
1164 if (!json_manifest->Init(manifest_json, error_info)) { | 1165 if (!json_manifest->Init(manifest_json, error_info)) { |
1165 return false; | 1166 return false; |
1166 } | 1167 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 DCHECK(pp::Module::Get()->core()->IsMainThread()); | 1451 DCHECK(pp::Module::Get()->core()->IsMainThread()); |
1451 DCHECK(nacl_interface_); | 1452 DCHECK(nacl_interface_); |
1452 exit_status_ = exit_status; | 1453 exit_status_ = exit_status; |
1453 nacl_interface_->SetReadOnlyProperty(pp_instance(), | 1454 nacl_interface_->SetReadOnlyProperty(pp_instance(), |
1454 pp::Var("exitStatus").pp_var(), | 1455 pp::Var("exitStatus").pp_var(), |
1455 pp::Var(exit_status_).pp_var()); | 1456 pp::Var(exit_status_).pp_var()); |
1456 } | 1457 } |
1457 | 1458 |
1458 | 1459 |
1459 } // namespace plugin | 1460 } // namespace plugin |
OLD | NEW |