Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 533833

Summary: [Webkit2] Should not use G_TYPE_CHECK_INSTANCE_TYPE(..)
Product: [Eclipse Project] Platform Reporter: Leo Ufimtsev <lufimtse>
Component: SWTAssignee: Leo Ufimtsev <lufimtse>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=533545
https://git.eclipse.org/r/121757
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1a130fd611a7d7d7abf532ad3a6068615a28daff
Whiteboard:

Description Leo Ufimtsev CLA 2018-04-19 13:32:17 EDT
After investigation in:
https://git.eclipse.org/r/#/c/121373/

Me/Eric/Alex/Roland observed/concluded that OS.G_TYPE_CHECK_INSTANCE_TYPE(..) is not a reliable mechanism of checking type at run time. This is a macro that is parsed at compile time and doesn't seem to work properly at run time for some clients.

This macro lead to a crash reported in:
  533545 – [GTK3.22][Webkit2][regression] Crash on opening html file
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=533545#c34
because the wrong logic was selected which caused a segfault.

Currently OS.G_TYPE_CHECK_INSTANCE_TYPE(..) is used in 3 places in Webkit, we need to adjust the code to not use it.
Comment 1 Eclipse Genie CLA 2018-04-25 14:47:31 EDT
New Gerrit change created: https://git.eclipse.org/r/121757