Bug 530678 [webkit2] UI hangs after navigating through Javadoc hover,
when
clicking an icon or link to an image.

TL;DR: Fix for bug.

Details:
Clicking on a javadoc like below, (after 2 or 3 times), breaks javadoc.
/**  <a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=272647">Screenshot</a>
*/
It un-breaks if you manually kill Webkit* processes.

I.e, Webkit process deadlocks if Browser is disposed in the middle of a
callback.

The fix is to delay disposal until callback is completed. This is
achived by leaving a dangling reference until next display loop
is executed.
This also fixes the bug: 494158 - [Webkit1][Webkit2] JVM crash when
javadoc hover has <embed> tags.

In addition, I'm adding a jUnit to verify that the fix hasn't introduced
memory leaks. (E.g if object is not unreferenced, then one can observe
a memory leak. So by extension this fix does not introduce a memory leak
since the test passes). (Note, it's not added to be ran automatically
becaues it takes 5+ minutes to run).

Tests & verification: (gtk3.22, Webkit2.18).
- jUnit: AllTests
- Child Eclipse opens external links (multiple times) in javadoc
correctly.
- Various Browser Snippets.
- Test_Memory_leak.test_Browser().

https://bugs.eclipse.org/bugs/show_bug.cgi?id=530678
Change-Id: I2a0f0f7e2b44bce67a1212bfa4205561942e59de
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
2 files changed
tree: 2e9bc7522364a0d4b671f9e377a11c6544e77459
  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!