Skip to content

I20180130-2000

tagged this 30 Jan 22:01
Fixing a corner case that can generate a deadlock.

- A) User calls evaluate(SCRIPT)
- B) The SCRIPT calls a BrowserFunction, (java/swt)
- C) The BrowserFunction calls evaluate()

Now webkit_web_view_run_javascript() in C never starts because
webkit is still executing A.
But A never finishes because it's waiting for C to complete to get a
return value for A's callback.

Solution: Don't allow blocking evaluation in BrowserFunction()
callbacks.
This shouldn't affect folks mostly, because from what I gather
people use 'evaluate' as a form of execute().

This has gone unnoticed on Win32/Cocoa because issue isn't explicitly
raised and 'evaluate()' return value wasn't used.

Verified with AllBrowser JUnits.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5298702
Change-Id: Iddc8c753051455f6706ea81db85e0c6610be11a9
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Assets 2
Loading