changeset 10805:75b02e82180f

Merge
author kcr
date Thu, 11 Jan 2018 10:21:06 -0800
parents ef935ffcd223 d3a6894796b7
children 399ded3c404d
files
diffstat 14 files changed, 147 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Thu Jan 11 10:16:00 2018 -0800
+++ b/build.gradle	Thu Jan 11 10:21:06 2018 -0800
@@ -3393,13 +3393,13 @@
         }
     }
 
-    def drtClasses = "com/sun/javafx/webkit/drt/**"
-    jar.exclude(drtClasses)
+    def drtClasses = "**/com/sun/javafx/webkit/drt/**"
     task drtJar(type: Jar, dependsOn: compileJava) {
         archiveName = "drt.jar"
         destinationDir = file("$buildDir/test")
-        from "$buildDir/classes/main"
+        from "$buildDir/classes/main/javafx.web/"
         include drtClasses
+        includeEmptyDirs = false
     }
 
     if (IS_COMPILE_WEBKIT) {
@@ -4259,6 +4259,7 @@
                 exclude("com/sun/glass/ui/swt")
                 exclude("com/sun/javafx/tools/ant")
                 exclude("com/javafx/main")
+                exclude("com/sun/javafx/webkit/drt")
                 if (!IS_INCLUDE_NULL3D) {
                     exclude ("com/sun/prism/null3d")
                 }
--- a/modules/javafx.graphics/src/main/native-glass/mac/ProcessInfo.m	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.graphics/src/main/native-glass/mac/ProcessInfo.m	Thu Jan 11 10:21:06 2018 -0800
@@ -127,8 +127,8 @@
 static inline char *_getCommandPath(char *command)
 {
     static char *full = NULL;
-    full = realloc(full, strlen("whereis ")+strlen(command)+1);
-    strcpy(full, "whereis ");
+    full = realloc(full, strlen("/usr/bin/whereis ")+strlen(command)+1);
+    strcpy(full, "/usr/bin/whereis ");
     strcat(full, command);
     char *path = _runCommand(full);
     if ((path != NULL) && (strlen(path) > 0))
@@ -178,6 +178,7 @@
         }
         _sortArray(array);
         _printArray(stream, "Loaded %d files\n", array);
+        free(command);
     }
 }
 
--- a/modules/javafx.graphics/src/main/native-glass/win/Robot.cpp	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.graphics/src/main/native-glass/win/Robot.cpp	Thu Jan 11 10:21:06 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -311,7 +311,7 @@
 
         // copy pixels into Java array
         env->SetIntArrayRegion(pixelArray, 0, numPixels, pixelData);
-        delete pixelData;
+        delete[] pixelData;
     }
 }
 
--- a/modules/javafx.graphics/src/main/native-prism-d3d/D3DContext.cc	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.graphics/src/main/native-prism-d3d/D3DContext.cc	Thu Jan 11 10:21:06 2018 -0800
@@ -217,19 +217,27 @@
     D3DMesh *mesh = (D3DMesh *) jlong_to_ptr(nativeMesh);
     RETURN_STATUS_IF_NULL(mesh, JNI_FALSE);
 
-    UINT vertexBufferSize = env->GetArrayLength(vb);
-    float *vertexBuffer = (float *) (env->GetPrimitiveArrayCritical(vb, NULL));
-    UINT indexBufferSize = env->GetArrayLength(ib);
-    USHORT *indexBuffer = (USHORT *) (env->GetPrimitiveArrayCritical(ib, NULL));
-
     if (vbSize < 0 || ibSize < 0) {
         return JNI_FALSE;
     }
 
     UINT uvbSize = (UINT) vbSize;
     UINT uibSize = (UINT) ibSize;
-    if (vertexBuffer == NULL || indexBuffer == NULL
-            || uvbSize > vertexBufferSize || uibSize > indexBufferSize) {
+    UINT vertexBufferSize = env->GetArrayLength(vb);
+    UINT indexBufferSize = env->GetArrayLength(ib);
+
+    if (uvbSize > vertexBufferSize || uibSize > indexBufferSize) {
+        return JNI_FALSE;
+    }
+
+    float *vertexBuffer = (float *) (env->GetPrimitiveArrayCritical(vb, NULL));
+    if (vertexBuffer == NULL) {
+        return JNI_FALSE;
+    }
+
+    USHORT *indexBuffer = (USHORT *) (env->GetPrimitiveArrayCritical(ib, NULL));
+    if (indexBuffer == NULL) {
+        env->ReleasePrimitiveArrayCritical(vb, vertexBuffer, 0);
         return JNI_FALSE;
     }
 
@@ -252,19 +260,26 @@
     D3DMesh *mesh = (D3DMesh *) jlong_to_ptr(nativeMesh);
     RETURN_STATUS_IF_NULL(mesh, JNI_FALSE);
 
-    UINT vertexBufferSize = env->GetArrayLength(vb);
-    float *vertexBuffer = (float *) (env->GetPrimitiveArrayCritical(vb, NULL));
-    UINT indexBufferSize = env->GetArrayLength(ib);
-    UINT *indexBuffer = (UINT *) (env->GetPrimitiveArrayCritical(ib, NULL));
-
     if (vbSize < 0 || ibSize < 0) {
         return JNI_FALSE;
     }
 
     UINT uvbSize = (UINT) vbSize;
     UINT uibSize = (UINT) ibSize;
-    if (vertexBuffer == NULL || indexBuffer == NULL
-            || uvbSize > vertexBufferSize || uibSize > indexBufferSize) {
+    UINT vertexBufferSize = env->GetArrayLength(vb);
+    UINT indexBufferSize = env->GetArrayLength(ib);
+    if (uvbSize > vertexBufferSize || uibSize > indexBufferSize) {
+        return JNI_FALSE;
+    }
+
+    float *vertexBuffer = (float *) (env->GetPrimitiveArrayCritical(vb, NULL));
+    if (vertexBuffer == NULL) {
+        return JNI_FALSE;
+    }
+
+    UINT *indexBuffer = (UINT *) (env->GetPrimitiveArrayCritical(ib, NULL));
+    if (indexBuffer == NULL) {
+        env->ReleasePrimitiveArrayCritical(vb, vertexBuffer, 0);
         return JNI_FALSE;
     }
 
--- a/modules/javafx.graphics/src/main/native-prism-d3d/D3DResourceFactory.cc	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.graphics/src/main/native-prism-d3d/D3DResourceFactory.cc	Thu Jan 11 10:21:06 2018 -0800
@@ -472,11 +472,11 @@
     JNIEnv *env, jlong context, jlong resource, jlong length,
     jobject buf, jarray pixelArray, jint cntW, jint cntH)
 {
-    BYTE *pixels = PBYTE( pixelArray ?
-            env->GetPrimitiveArrayCritical(pixelArray, 0) :
-            env->GetDirectBufferAddress(buf));
+    D3DContext *pCtx = (D3DContext*)jlong_to_ptr(context);
+    RETURN_STATUS_IF_NULL(pCtx, E_FAIL);
 
-    RETURN_STATUS_IF_NULL(pixels, E_OUTOFMEMORY);
+    D3DResource *pResource = (D3DResource*)jlong_to_ptr(resource);
+    RETURN_STATUS_IF_NULL(pResource, E_FAIL);
 
     // sanity check about we have enought memory
     // Since we are certain cntW and cntH are positive numbers
@@ -487,11 +487,11 @@
         return E_OUTOFMEMORY;
     }
 
-    D3DContext *pCtx = (D3DContext*)jlong_to_ptr(context);
-    RETURN_STATUS_IF_NULL(pCtx, E_FAIL);
+    BYTE *pixels = PBYTE( pixelArray ?
+            env->GetPrimitiveArrayCritical(pixelArray, 0) :
+            env->GetDirectBufferAddress(buf));
 
-    D3DResource *pResource = (D3DResource*)jlong_to_ptr(resource);
-    RETURN_STATUS_IF_NULL(pResource, E_FAIL);
+    RETURN_STATUS_IF_NULL(pixels, E_OUTOFMEMORY);
 
     HRESULT res = D3DResourceFactory_nReadPixels(pCtx, pResource, pixels, cntW, cntH);
 
--- a/modules/javafx.media/src/main/native/gstreamer/3rd_party/glib/glib-2.42.1/build/osx/config.h	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.media/src/main/native/gstreamer/3rd_party/glib/glib-2.42.1/build/osx/config.h	Thu Jan 11 10:21:06 2018 -0800
@@ -14,7 +14,7 @@
 #define ALIGNOF_UNSIGNED_LONG 8
 
 /* poll doesn't work on devices */
-#define BROKEN_POLL 1
+/* #undef BROKEN_POLL */
 
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
--- a/modules/javafx.media/src/main/native/gstreamer/3rd_party/glib/glib-2.42.1/glib/gmain.c	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.media/src/main/native/gstreamer/3rd_party/glib/glib-2.42.1/glib/gmain.c	Thu Jan 11 10:21:06 2018 -0800
@@ -3820,6 +3820,11 @@
       context->cached_poll_array_size = allocated_nfds = nfds;
       context->cached_poll_array = fds = g_new (GPollFD, nfds);
       UNLOCK_CONTEXT (context);
+#ifdef GSTREAMER_LITE
+      if (fds == NULL) {
+        return FALSE;
+      }
+#endif // GSTREAMER_LITE
     }
 
   if (!block)
--- a/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/sys/directsound/gstdirectsoundsink.c	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/sys/directsound/gstdirectsoundsink.c	Thu Jan 11 10:21:06 2018 -0800
@@ -781,7 +781,7 @@
   dsoundsink = GST_DIRECTSOUND_SINK (asink);
 
 #ifdef GSTREAMER_LITE
-  if (dsoundsink->pDS == NULL)
+  if (dsoundsink->pDS == NULL || dsoundsink->pDSBSecondary == NULL)
     return nNbSamplesInQueue;
 #endif // GSTREAMER_LITE
 
--- a/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/plugins/elements/gstqueue.c	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/plugins/elements/gstqueue.c	Thu Jan 11 10:21:06 2018 -0800
@@ -1284,6 +1284,11 @@
   GstFlowReturn ret;
 
   queue = (GstQueue *) GST_PAD_PARENT (pad);
+#ifdef GSTREAMER_LITE
+  if (queue == NULL) {
+    return;
+  }
+#endif // GSTREAMER_LITE
 
   /* have to lock for thread-safety */
   GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/av/audiodecoder.c	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.media/src/main/native/gstreamer/plugins/av/audiodecoder.c	Thu Jan 11 10:21:06 2018 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -773,11 +773,26 @@
 #if DECODE_AUDIO4
     if (base->frame->format == AV_SAMPLE_FMT_S16P || base->frame->format == AV_SAMPLE_FMT_FLTP)
     {
+        // Make sure we received expected data
+        int cc = decoder->num_channels;
+        for (ci = 0; ci < cc && ci < AUDIODECODER_OUT_NUM_CHANNELS; ci++)
+        {
+            if (base->frame->data[ci] == NULL)
+            {
+                gst_buffer_unmap(outbuf, &info2);
+                // INLINE - gst_buffer_unref()
+                gst_buffer_unref(outbuf);
+                gst_element_message_full(GST_ELEMENT(decoder), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE,
+                                     g_strdup("Audio decoding failed"), NULL, ("audiodecoder.c"), ("audiodecoder_chain"), 0);
+                ret = GST_FLOW_ERROR;
+                goto _exit;
+            }
+        }
+
         // Reformat the output frame into single buffer.
         int16_t *buffer = (int16_t*)info2.data;
         for (sample = 0; sample < base->frame->nb_samples; sample++)
         {
-            int cc = decoder->num_channels;
             for (ci = 0; ci < cc && ci < AUDIODECODER_OUT_NUM_CHANNELS; ci++)
             {
                 switch (base->frame->format)
--- a/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/JavaEnv.cpp	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/JavaEnv.cpp	Thu Jan 11 10:21:06 2018 -0800
@@ -7,6 +7,53 @@
 
 JavaVM* jvm = 0;
 
+
+jclass dumpRenderTreeClass;
+static jmethodID waitUntilDoneMID;
+static jmethodID notifyDoneMID;
+static jmethodID overridePreferenceMID;
+static jmethodID getBackForwardItemCountMID;
+static jmethodID resolveURLMID;
+static jmethodID loadURLMID;
+static jmethodID goBackForwardMID;
+
+jclass getDumpRenderTreeClass() { return dumpRenderTreeClass; }
+jmethodID getWaitUntillDoneMethodId() { return waitUntilDoneMID; }
+jmethodID getNotifyDoneMID() { return notifyDoneMID; }
+jmethodID getOverridePreferenceMID() { return overridePreferenceMID; }
+jmethodID getGetBackForwardItemCountMID() { return getBackForwardItemCountMID; }
+jmethodID getResolveURLMID() { return resolveURLMID; }
+jmethodID getLoadURLMID() { return loadURLMID; }
+jmethodID getGoBackForward() { return goBackForwardMID; }
+
+static void initRefs(JNIEnv* env) {
+    if (!dumpRenderTreeClass) {
+        jclass cls =  env->FindClass("com/sun/javafx/webkit/drt/DumpRenderTree");
+        dumpRenderTreeClass = (jclass)env->NewGlobalRef(cls);
+        if (JNI_TRUE == env->ExceptionCheck()) {
+                env->ExceptionDescribe();
+                env->ExceptionClear();
+                return;
+            }
+        ASSERT(dumpRenderTreeClass);
+        waitUntilDoneMID = env->GetStaticMethodID(dumpRenderTreeClass, "waitUntilDone", "()V");
+        ASSERT(waitUntilDoneMID);
+        notifyDoneMID = env->GetStaticMethodID(dumpRenderTreeClass, "notifyDone", "()V");
+        ASSERT(notifyDoneMID);
+        overridePreferenceMID = env->GetStaticMethodID(dumpRenderTreeClass, "overridePreference", "(Ljava/lang/String;Ljava/lang/String;)V");
+        ASSERT(overridePreferenceMID);
+        getBackForwardItemCountMID = env->GetStaticMethodID(dumpRenderTreeClass, "getBackForwardItemCount", "()I");
+        ASSERT(getBackForwardItemCountMID);
+        resolveURLMID = env->GetStaticMethodID(dumpRenderTreeClass, "resolveURL", "(Ljava/lang/String;)Ljava/lang/String;");
+        ASSERT(resolveURLMID);
+        loadURLMID = env->GetStaticMethodID(dumpRenderTreeClass, "loadURL", "(Ljava/lang/String;)V");
+        ASSERT(loadURLMID);
+        goBackForwardMID = env->GetStaticMethodID(dumpRenderTreeClass, "goBackForward", "(I)V");
+        ASSERT(goBackForwardMID);
+    }
+}
+
+
 JNIEnv* JNICALL DumpRenderTree_GetJavaEnv()
 {
     void* env;
@@ -31,11 +78,19 @@
 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
 {
     jvm = vm;
+    JNIEnv *env;
+    if (jvm->GetEnv((void **)&env, JNI_VERSION_1_2)) {
+        fprintf(stderr, "DumpRenderTree::JNI_OnLoad() failed \n");
+             return JNI_ERR; /* JNI version not supported */
+         }
+     initRefs(env);
     return JNI_VERSION_1_2;
 }
 
 JNIEXPORT void JNICALL JNI_OnUnLoad(JavaVM* vm, void* reserved)
 {
+    JNIEnv *env = DumpRenderTree_GetJavaEnv();
+    env->DeleteGlobalRef(dumpRenderTreeClass);
     jvm = 0;
 }
 
--- a/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/JavaEnv.h	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/JavaEnv.h	Thu Jan 11 10:21:06 2018 -0800
@@ -10,6 +10,16 @@
 
 JNIEnv* JNICALL DumpRenderTree_GetJavaEnv();
 
+jclass getDumpRenderTreeClass();
+jmethodID getWaitUntillDoneMethodId();
+jmethodID getNotifyDoneMID();
+jmethodID getOverridePreferenceMID();
+jmethodID getGetBackForwardItemCountMID();
+jmethodID getResolveURLMID();
+jmethodID getLoadURLMID();
+jmethodID getGoBackForward();
+
+
 bool CheckAndClearException(JNIEnv* env);
 
 #define jlong_to_ptr(a) ((void*)(uintptr_t)(a))
--- a/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/TestRunnerJava.cpp	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/TestRunnerJava.cpp	Thu Jan 11 10:21:06 2018 -0800
@@ -13,13 +13,6 @@
 
 extern JSGlobalContextRef gContext;
 
-jclass getDRTClass(JNIEnv* env)
-{
-    static JGClass cls(env->FindClass("com/sun/javafx/webkit/drt/DumpRenderTree"));
-    ASSERT(cls);
-    return cls;
-}
-
 jstring JSStringRef_to_jstring(JSStringRef ref, JNIEnv* env)
 {
     size_t size = JSStringGetLength(ref);
@@ -113,22 +106,16 @@
 void TestRunner::notifyDone()
 {
     JNIEnv* env = DumpRenderTree_GetJavaEnv();
-
-    static jmethodID notifyDoneMID = env->GetStaticMethodID(getDRTClass(env), "notifyDone", "()V");
-    ASSERT(notifyDoneMID);
-    env->CallStaticVoidMethod(getDRTClass(env), notifyDoneMID);
+    env->CallStaticVoidMethod(getDumpRenderTreeClass(), getNotifyDoneMID());
     CheckAndClearException(env);
 }
 
 void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
 {
     JNIEnv* env = DumpRenderTree_GetJavaEnv();
-
     JLString jRelKey(JSStringRef_to_jstring(key, env));
     JLString jRelValue(JSStringRef_to_jstring(value, env));
-    static jmethodID overridePreferenceMID = env->GetStaticMethodID(getDRTClass(env), "overridePreference", "(Ljava/lang/String;Ljava/lang/String;)V");
-    ASSERT(overridePreferenceMID);
-    env->CallStaticVoidMethod(getDRTClass(env), overridePreferenceMID, (jstring)jRelKey, (jstring)jRelValue);
+    env->CallStaticVoidMethod(getDumpRenderTreeClass(), getOverridePreferenceMID(), (jstring)jRelKey, (jstring)jRelValue);
     CheckAndClearException(env);
 }
 
@@ -146,9 +133,7 @@
 size_t TestRunner::webHistoryItemCount()
 {
     JNIEnv* env = DumpRenderTree_GetJavaEnv();
-    static jmethodID getBackForwardItemCountMID = env->GetStaticMethodID(getDRTClass(env), "getBackForwardItemCount", "()I");
-    ASSERT(getBackForwardItemCountMID);
-    jint count = env->CallStaticIntMethod(getDRTClass(env), getBackForwardItemCountMID);
+    jint count = env->CallStaticIntMethod(getDumpRenderTreeClass(), getGetBackForwardItemCountMID());
     CheckAndClearException(env);
     return (size_t)count;
 }
@@ -156,17 +141,10 @@
 void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
 {
     JNIEnv* env = DumpRenderTree_GetJavaEnv();
-
     JLString jRelUrl(JSStringRef_to_jstring(url, env));
-
-    static jmethodID resolveUrlMID = env->GetStaticMethodID(getDRTClass(env), "resolveURL", "(Ljava/lang/String;)Ljava/lang/String;");
-    ASSERT(resolveUrlMID);
-
-    JLString jAbsUrl((jstring)env->CallStaticObjectMethod(getDRTClass(env), resolveUrlMID, (jstring)jRelUrl));
+    JLString jAbsUrl((jstring)env->CallStaticObjectMethod(getDumpRenderTreeClass(), getResolveURLMID(), (jstring)jRelUrl));
     CheckAndClearException(env);
-
     JSStringRef absUrlRef = jstring_to_JSStringRef((jstring)jAbsUrl, env);
-
     WorkQueue::singleton().queue(new LoadItem(absUrlRef, target));
 }
 
@@ -296,9 +274,7 @@
         return;
     }
 
-    static jmethodID notifyDoneMID = env->GetStaticMethodID(getDRTClass(env), "waitUntilDone", "()V");
-    ASSERT(notifyDoneMID);
-    env->CallStaticVoidMethod(getDRTClass(env), notifyDoneMID);
+    env->CallStaticVoidMethod(getDumpRenderTreeClass(), getWaitUntillDoneMethodId());
     CheckAndClearException(env);
 }
 
--- a/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/WorkQueueItemJava.cpp	Thu Jan 11 10:16:00 2018 -0800
+++ b/modules/javafx.web/src/main/native/Tools/DumpRenderTree/java/WorkQueueItemJava.cpp	Thu Jan 11 10:21:06 2018 -0800
@@ -9,19 +9,14 @@
 
 #include "WorkQueueItem.h"
 
-extern jclass getDRTClass(JNIEnv* env);
 extern jstring JSStringRef_to_jstring(JSStringRef ref, JNIEnv* env);
 extern JSStringRef jstring_to_JSStringRef(jstring str, JNIEnv* env);
 
 bool LoadItem::invoke() const
 {
     JNIEnv* env = DumpRenderTree_GetJavaEnv();
-
     JLString jUrl(JSStringRef_to_jstring(m_url.get(), env));
-
-    static jmethodID loadUrlMID = env->GetStaticMethodID(getDRTClass(env), "loadURL", "(Ljava/lang/String;)V");
-    ASSERT(loadUrlMID);
-    env->CallStaticObjectMethod(getDRTClass(env), loadUrlMID, (jstring)jUrl);
+    env->CallStaticObjectMethod(getDumpRenderTreeClass(), getLoadURLMID(), (jstring)jUrl);
     CheckAndClearException(env);
 
     return true;
@@ -42,10 +37,7 @@
 bool BackForwardItem::invoke() const
 {
     JNIEnv* env = DumpRenderTree_GetJavaEnv();
-
-    static jmethodID goMID = env->GetStaticMethodID(getDRTClass(env), "goBackForward", "(I)V");
-    ASSERT(goMID);
-    env->CallStaticObjectMethod(getDRTClass(env), goMID, m_howFar);
+    env->CallStaticObjectMethod(getDumpRenderTreeClass(), getGoBackForward(), m_howFar);
     CheckAndClearException(env);
 
     return true;