Implement support for v8 counters

This commit is contained in:
Andrei Popescu
2010-02-01 22:32:16 +00:00
parent b83e68c95b
commit 5e7bb0a9ca
2 changed files with 19 additions and 1 deletions

View File

@@ -3493,6 +3493,17 @@ public class WebView extends AbsoluteLayout
mWebViewCore.sendMessage(EventHub.DUMP_RENDERTREE, toFile ? 1 : 0, 0);
}
/**
* Dump the V8 counters to standard output.
* Note that you need a build with V8 and WEBCORE_INSTRUMENTATION set to
* true. Otherwise, this will do nothing.
*
* @hide debug only
*/
public void dumpV8Counters() {
mWebViewCore.sendMessage(EventHub.DUMP_V8COUNTERS);
}
// This is used to determine long press with the center key. Does not
// affect long press with the trackball/touch.
private boolean mGotCenterDown = false;

View File

@@ -524,6 +524,8 @@ final class WebViewCore {
private native void nativeDumpNavTree();
private native void nativeDumpV8Counters();
private native void nativeSetJsFlags(String flags);
/**
@@ -874,8 +876,9 @@ final class WebViewCore {
static final int DUMP_DOMTREE = 170;
static final int DUMP_RENDERTREE = 171;
static final int DUMP_NAVTREE = 172;
static final int DUMP_V8COUNTERS = 173;
static final int SET_JS_FLAGS = 173;
static final int SET_JS_FLAGS = 174;
// Geolocation
static final int GEOLOCATION_PERMISSIONS_PROVIDE = 180;
@@ -1296,6 +1299,10 @@ final class WebViewCore {
nativeDumpNavTree();
break;
case DUMP_V8COUNTERS:
nativeDumpV8Counters();
break;
case SET_JS_FLAGS:
nativeSetJsFlags((String)msg.obj);
break;