commit | 61b1bc783bfeed2794539b90633fbaf9ac64819e | [log] [tgz] |
---|---|---|
author | Leo Ufimtsev <lufimtse@redhat.com> | Wed Oct 04 19:02:02 2017 -0400 |
committer | Alexander Kurtakov <akurtako@redhat.com> | Thu Oct 05 06:05:00 2017 -0400 |
tree | 6383ced899e08283dc87aca95184f415f31f62d2 | |
parent | 5d455e5e20def7b9fbc72b6121f7b4bdade6828a [diff] |
Bug 514859 [Webkit2] Verify that no webkit1-only functions are called on Webkit2. As part of the webkit2 port, we must ensure that no webkit1 functions are ever called by webkit2. To ensure this, I've added assertions around native function calls. During the patch, I discovered multiple webkit1 only functions that were reached by webkit2. (Will post into bug). This patch has no real functional impact, only asserts, comments and some refactoring. Note: assertions are not executed normally, only by jUnits and if '-ea' is specified in vm args. Technical notes: - I moved the "WEBKIT2" variable and the logic that loads the native libraries from WebKit.java to WebKitGTK.java, so that the native function wrappers can access the WEBKIT2 variable. I ensured that classes are loaded in proper order. - I added a WEBKIT1 flag for clarity. The negation !WEBKIT2 slows down code reading, it's very annoying. I also carefully ensured that there is no functional difference. - I added asserts around every webkit(1|2) function call. (I did this with some help of programmatically checking if a function is webkit1 or only webkit2). - Found some Webkit1 only functions being called on Webkit2 (see bug for details. See "TODO - guard from being called on webkit2" inline comments in patch). - Sprinkled some more asserts into WebKit.java and added comments. - Guarded a few Webkit1 only functions from being reached by webkit2 and added some TODO's into that code. - Found that my SWT_LIB_VERSIONS logic was calling a webkit2 only function when webkit2 was called. Fixed that up. - I changed org.eclipse.jdt.ui.prefs a bit so that it it doesn't turn static imports into "*" for WEBKIT1 and WEBKIT2 flag. (WEBKIT1 and WEBKIT2 flag is imported statically in WebKit.java, for sake of brevity). Testing - Junits for Webkit1 & Webkit2 - Child eclipse with webkit1 & webkit2 Change-Id: Ic63503e68e73974a0ca2c7716faabe5039df5ccb Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Thanks for your interest in this project.
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.
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
Contact the project developers via the project's “dev” list.
This project uses Bugzilla to track ongoing development and issues.
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!