Bug 529870 – [webkit2]BrowserProblem

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>
2 files changed
tree: 776ba16a8f8d31ff4882766c8787ed4744af356e
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. pom.xml
  8. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!