| 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 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 PP_NACL_MANIFEST_MISSING_ARCH); | 1408 PP_NACL_MANIFEST_MISSING_ARCH); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 // Set the readyState attribute to indicate we need to start over. | 1411 // Set the readyState attribute to indicate we need to start over. |
| 1412 set_nacl_ready_state(DONE); | 1412 set_nacl_ready_state(DONE); |
| 1413 set_nexe_error_reported(true); | 1413 set_nexe_error_reported(true); |
| 1414 // Report an error in lastError and on the JavaScript console. | 1414 // Report an error in lastError and on the JavaScript console. |
| 1415 nacl::string message = nacl::string("NaCl module load failed: ") + | 1415 nacl::string message = nacl::string("NaCl module load failed: ") + |
| 1416 error_info.message(); | 1416 error_info.message(); |
| 1417 set_last_error_string(message); | 1417 set_last_error_string(message); |
| 1418 AddToConsole(message); | 1418 AddToConsole(nacl::string("NaCl module load failed: ") + |
| 1419 error_info.console_message()); |
| 1419 // Inform JavaScript that loading encountered an error and is complete. | 1420 // Inform JavaScript that loading encountered an error and is complete. |
| 1420 EnqueueProgressEvent(kProgressEventError); | 1421 EnqueueProgressEvent(kProgressEventError); |
| 1421 EnqueueProgressEvent(kProgressEventLoadEnd); | 1422 EnqueueProgressEvent(kProgressEventLoadEnd); |
| 1422 | 1423 |
| 1423 // UMA | 1424 // UMA |
| 1424 HistogramEnumerateLoadStatus(error_info.error_code(), is_installed_); | 1425 HistogramEnumerateLoadStatus(error_info.error_code(), is_installed_); |
| 1425 } | 1426 } |
| 1426 | 1427 |
| 1427 | 1428 |
| 1428 void Plugin::ReportLoadAbort() { | 1429 void Plugin::ReportLoadAbort() { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1680 static_cast<uint32_t>(text.size())); | 1681 static_cast<uint32_t>(text.size())); |
| 1681 const PPB_Console* console_interface = | 1682 const PPB_Console* console_interface = |
| 1682 static_cast<const PPB_Console*>( | 1683 static_cast<const PPB_Console*>( |
| 1683 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); | 1684 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); |
| 1684 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); | 1685 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); |
| 1685 var_interface->Release(prefix); | 1686 var_interface->Release(prefix); |
| 1686 var_interface->Release(str); | 1687 var_interface->Release(str); |
| 1687 } | 1688 } |
| 1688 | 1689 |
| 1689 } // namespace plugin | 1690 } // namespace plugin |
| OLD | NEW |