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