Class WebKit.Webkit2AsyncToSync.CallBackMap
java.lang.Object
org.eclipse.swt.browser.WebKit.Webkit2AsyncToSync.CallBackMap
- Enclosing class:
WebKit.Webkit2AsyncToSync
Every callback is tagged with a unique ID.
The ID is used for the callback to find the object via which data is returned
and allow the original call to finish.
Note: The reason each callback is tagged with an ID is because two(or more) subsequent
evaluate() calls can be started before the first callback comes back.
As such, there would be ambiguity as to which call a callback belongs to, which in turn causes deadlocks.
This is typically seen when a webkit2 signal (e.g closeListener) makes a call to evaluate(),
when the closeListener was triggered by evaluate("window.close()").
An example test case where this is seen is:
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.test_execute_and_closeListener()
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static HashMap<Integer, WebKit.Webkit2AsyncToSync.Webkit2AsyncReturnObj> private static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static int(package private) static WebKit.Webkit2AsyncToSync.Webkit2AsyncReturnObjgetObj(int id) (package private) static intprivate static voidremoveId(int id) (package private) static voidremoveObject(int id)
-
Field Details
-
callbackMap
-
nextCallbackId
private static int nextCallbackId -
usedCallbackIds
-
-
Constructor Details
-
CallBackMap
private CallBackMap()
-
-
Method Details
-
putObject
-
getObj
-
removeObject
static void removeObject(int id) -
getNextId
static int getNextId() -
removeId
private static void removeId(int id)
-