OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2011 The Chromium 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 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" | 7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" |
8 | 8 |
9 #include "native_client/src/trusted/plugin/service_runtime.h" | 9 #include "native_client/src/trusted/plugin/service_runtime.h" |
10 | 10 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 p->url.c_str(), mapped_url.c_str()); | 269 p->url.c_str(), mapped_url.c_str()); |
270 | 270 |
271 open_cont = new OpenManifestEntryResource(*p); // copy ctor! | 271 open_cont = new OpenManifestEntryResource(*p); // copy ctor! |
272 CHECK(open_cont != NULL); | 272 CHECK(open_cont != NULL); |
273 open_cont->url = mapped_url; | 273 open_cont->url = mapped_url; |
274 pp::CompletionCallback stream_cc = WeakRefNewCallback( | 274 pp::CompletionCallback stream_cc = WeakRefNewCallback( |
275 anchor_, | 275 anchor_, |
276 this, | 276 this, |
277 &PluginReverseInterface::StreamAsFile_MainThreadContinuation, | 277 &PluginReverseInterface::StreamAsFile_MainThreadContinuation, |
278 open_cont); | 278 open_cont); |
279 if (!plugin_->StreamAsFile(mapped_url, stream_cc.pp_completion_callback())) { | 279 if (!plugin_->StreamAsFile(mapped_url, |
| 280 manifest_->PermitsExtensionUrls(), |
| 281 stream_cc.pp_completion_callback())) { |
280 NaClLog(4, | 282 NaClLog(4, |
281 "OpenManifestEntry_MainThreadContinuation: StreamAsFile failed\n"); | 283 "OpenManifestEntry_MainThreadContinuation: StreamAsFile failed\n"); |
282 nacl::MutexLocker take(&mu_); | 284 nacl::MutexLocker take(&mu_); |
283 *p->op_complete_ptr = true; // done... | 285 *p->op_complete_ptr = true; // done... |
284 *p->out_desc = -1; // but failed. | 286 *p->out_desc = -1; // but failed. |
285 p->error_info->SetReport(ERROR_MANIFEST_OPEN, | 287 p->error_info->SetReport(ERROR_MANIFEST_OPEN, |
286 "ServiceRuntime: StreamAsFile failed"); | 288 "ServiceRuntime: StreamAsFile failed"); |
287 NaClXCondVarBroadcast(&cv_); | 289 NaClXCondVarBroadcast(&cv_); |
288 return; | 290 return; |
289 } | 291 } |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 nacl::MutexLocker take(&mu_); | 618 nacl::MutexLocker take(&mu_); |
617 return exit_status_; | 619 return exit_status_; |
618 } | 620 } |
619 | 621 |
620 void ServiceRuntime::set_exit_status(int exit_status) { | 622 void ServiceRuntime::set_exit_status(int exit_status) { |
621 nacl::MutexLocker take(&mu_); | 623 nacl::MutexLocker take(&mu_); |
622 exit_status_ = exit_status & 0xff; | 624 exit_status_ = exit_status & 0xff; |
623 } | 625 } |
624 | 626 |
625 } // namespace plugin | 627 } // namespace plugin |
OLD | NEW |