When a JavaScript console message is received from WebCore, write it to the log.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 9a433b6..f29ac28 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3693,6 +3693,17 @@
             intent.putExtra(PermissionDialog.PARAM_QUOTA, currentQuota);
             startActivityForResult(intent, WEBSTORAGE_QUOTA_DIALOG);
         }
+
+        /* Adds a JavaScript error message to the system log.
+         * @param message The error message to report.
+         * @param lineNumber The line number of the error.
+         * @param sourceID The name of the source file that caused the error.
+         */
+        @Override
+        public void addMessageToConsole(String message, int lineNumber, String sourceID) {
+            Log.w(LOGTAG, "Console: " + message + " (" + sourceID + ":" + lineNumber + ")");
+        }
+
     };
 
     /**