/* * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. */ #include "config.h" #include #include #include namespace WTF { void scheduleDispatchFunctionsOnMainThread() { AttachThreadAsNonDaemonToJavaEnv autoAttach; JNIEnv* env = autoAttach.env(); static JGClass jMainThreadCls(env->FindClass("com/sun/webkit/MainThread")); static jmethodID mid = env->GetStaticMethodID( jMainThreadCls, "fwkScheduleDispatchFunctions", "()V"); ASSERT(mid); env->CallStaticVoidMethod(jMainThreadCls, mid); CheckAndClearException(env); } void initializeMainThreadPlatform() { } extern "C" { /* * Class: com_sun_webkit_MainThread * Method: twkScheduleDispatchFunctions * Signature: ()V */ JNIEXPORT void JNICALL Java_com_sun_webkit_MainThread_twkScheduleDispatchFunctions (JNIEnv*, jobject) { dispatchFunctionsFromMainThread(); } } } // namespace WTF