diff options
author | Leo Ufimtsev | 2017-10-04 23:02:02 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-10-05 10:05:00 +0000 |
commit | 61b1bc783bfeed2794539b90633fbaf9ac64819e (patch) | |
tree | 6383ced899e08283dc87aca95184f415f31f62d2 /bundles/org.eclipse.swt/.settings | |
parent | 5d455e5e20def7b9fbc72b6121f7b4bdade6828a (diff) | |
download | eclipse.platform.swt-61b1bc783bfeed2794539b90633fbaf9ac64819e.tar.gz eclipse.platform.swt-61b1bc783bfeed2794539b90633fbaf9ac64819e.tar.xz eclipse.platform.swt-61b1bc783bfeed2794539b90633fbaf9ac64819e.zip |
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>
Diffstat (limited to 'bundles/org.eclipse.swt/.settings')
-rw-r--r-- | bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs index 5a9440f9dd..dc92561f1e 100644 --- a/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs +++ b/bundles/org.eclipse.swt/.settings/org.eclipse.jdt.ui.prefs @@ -3,7 +3,7 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;org;com;
org.eclipse.jdt.ui.ondemandthreshold=1
-org.eclipse.jdt.ui.staticondemandthreshold=1
+org.eclipse.jdt.ui.staticondemandthreshold=3
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
|