Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e7bb0a9 authored by Andrei Popescu's avatar Andrei Popescu
Browse files

Implement support for v8 counters

parent b83e68c9
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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;
+8 −1
Original line number Diff line number Diff line
@@ -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;