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

Unified Diff: chrome/browser/extensions/error_console/error_console.cc

Issue 23007021: Report Javascript Runtime Errors to the Error Console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_feldman
Patch Set: Created 7 years, 4 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: chrome/browser/extensions/error_console/error_console.cc
diff --git a/chrome/browser/extensions/error_console/error_console.cc b/chrome/browser/extensions/error_console/error_console.cc
index cff063cd3adc45272e927bd7140317f31fcc40c1..4e2643f342e7f160f4c18e39c3b3cb8c98be078a 100644
--- a/chrome/browser/extensions/error_console/error_console.cc
+++ b/chrome/browser/extensions/error_console/error_console.cc
@@ -68,6 +68,10 @@ void ErrorConsole::ReportError(scoped_ptr<const ExtensionError> scoped_error) {
DCHECK(thread_checker_.CalledOnValidThread());
const ExtensionError* error = scoped_error.release();
+
+ if (!Extension::IdIsValid(error->extension_id()))
+ return;
+
// If there are too many errors for an extension already, limit ourselves to
// the most recent ones.
ErrorList* error_list = &errors_[error->extension_id()];

Powered by Google App Engine
This is Rietveld 408576698