Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin_error.h

Issue 18045007: Show more different NaCl loading errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/trusted/plugin/plugin_error.h
===================================================================
--- ppapi/native_client/src/trusted/plugin/plugin_error.h (revision 211556)
+++ ppapi/native_client/src/trusted/plugin/plugin_error.h (working copy)
@@ -115,23 +115,41 @@
void SetReport(PluginErrorCode error_code, const std::string& message) {
error_code_ = error_code;
message_ = message;
+ console_message_ = message;
}
+ // console_message is a part of error that is logged to javascript console
Mark Seaborn 2013/07/18 22:15:49 "javascript" -> "Javascript" or "JavaScript"
halyavin 2013/07/19 09:06:20 Done.
+ // but is not reported to javascript on the page. This is need to report
Mark Seaborn 2013/07/18 22:15:49 More specifically: "not reported to JavaScript via
halyavin 2013/07/19 09:06:20 Done.
+ // internal errors which may easily change in new versions of the browser.
+ void SetReportWithConsoleOnlyError(PluginErrorCode error_code,
+ const std::string& message,
+ const std::string& console_message) {
+ error_code_ = error_code;
+ message_ = message;
+ console_message_ = message + console_message;
Mark Seaborn 2013/07/18 22:15:49 Shouldn't there be some punctuation between the me
halyavin 2013/07/19 09:06:20 I used semicolon so that we don't have 2 colons in
Mark Seaborn 2013/07/19 15:25:30 FWIW, I think multiple colons in a sentence are OK
+ }
+
PluginErrorCode error_code() const {
return error_code_;
}
void PrependMessage(const std::string& prefix) {
message_ = prefix + message_;
+ console_message_ = prefix + console_message_;
}
const std::string& message() const {
return message_;
}
+ const std::string& console_message() const {
+ return console_message_;
+ }
+
private:
PluginErrorCode error_code_;
std::string message_;
+ std::string console_message_;
NACL_DISALLOW_COPY_AND_ASSIGN(ErrorInfo);
};

Powered by Google App Engine
This is Rietveld 408576698