OSDN Git Service

When a JavaScript console message is received from WebCore, write it to the log.
authorBen Murdoch <benm@google.com>
Wed, 3 Jun 2009 17:21:19 +0000 (18:21 +0100)
committerBen Murdoch <benm@google.com>
Fri, 5 Jun 2009 11:39:59 +0000 (12:39 +0100)
src/com/android/browser/BrowserActivity.java

index 9a433b6..f29ac28 100644 (file)
@@ -3693,6 +3693,17 @@ public class BrowserActivity extends Activity
             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 + ")");
+        }
+
     };
 
     /**