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

Bug 452138

Summary: Reduce number of error-prone manual steps needed to support new versions of XULRunner
Product: [Eclipse Project] Platform Reporter: Neil Rashbrook <neil>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: lshanmug
Version: 4.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Neil Rashbrook CLA 2014-11-18 10:51:47 EST
A number of error-prone steps are necessary to add support for new versions of XULRunner. One important problem is the movement of virtual methods within the vtbl, for instance nsIDOMWindow.java's GetFrames method has to use the expression nsISupports.LAST_METHOD_ID + (IsXULRunner24() ? 66 : (IsXULRunner10() ? 62 : 5)) and that will probably have to change again to support XULRunner 31.

However it is possible to query the interface info manager for this information, so simplifying the virtual call process; in fact I have created an overload of XPCOM.VtblCall which will call most virtual methods requiring only their name and interface name.
Comment 1 Neil Rashbrook CLA 2014-11-18 11:05:11 EST
In a cruel twist of irony, the IIDs of the interface info manager and the interface info have both changed (separately).
Comment 2 Lakshmi P Shanmugam CLA 2014-12-11 06:47:15 EST
Gerrit review:
https://git.eclipse.org/r/#/c/36651

I've pushed the patch to xulrunner-31 branch > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=xulrunner-31&id=f6e8d7c3b98020ef2b8fbc5fc5f9dd3dbbba612e

I'll update the code in the branch to use the new methods to get the index. I'll start with interfaces that have changed in XULR31.
Comment 3 Lakshmi P Shanmugam CLA 2017-01-27 07:00:09 EST
XULRunner has been deprecated and removed from the source tree, see
https://groups.google.com/d/msg/mozilla.dev.platform/_rFMunG2Bgw/C-4PcHj9IgAJ

Closing this request since makes little sense to invest in a dead technology.