static int JSObjectCallAsFunctionProc (int ctx, int function, int thisObject, int argumentCount, int arguments, int exception) {
WebKit_win32.JSGlobalContextRetain (ctx);
if (WebKit_win32.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) {
return WebKit_win32.JSValueMakeUndefined (ctx);
}
int ptr = WebKit_win32.JSObjectGetPrivate (thisObject);
int [] handle = new int [1];
C.memmove (handle, ptr, C.PTR_SIZEOF);
Browser browser = findBrowser (handle[0]);
if (browser == null) return WebKit_win32.JSValueMakeUndefined (ctx);
WebKit webkit = (WebKit)browser.webBrowser;
return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception);
}