Buggy code:
static Callback eventCallback ; static int eventProc ; static String profileRootDirectory ; static final String PACKAGE_PREFIX = "org.eclipse.swt.browser." ; static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget" ; static final String NO_INPUT_METHOD = "org.eclipse.swt.internal.gtk.noInputMethod" ; static final String URI_FROMMEMORY = "file://////" ; static final String ABOUT_BLANK = "about:blank" ; static final String PREFERENCE_LANGUAGES = "intl.accept_languages" ; static final String PREFERENCE_CHARSET = "intl.charset.default" ; static final String SEPARATOR_LOCALE = "-" ; static final String TOKENIZER_LOCALE = "," ; static final String PROFILE_DIR = "//eclipse//" ; static final String HISTORY_FILE = "history.dat" ; static final String MIMETYPES_FILE = "mimeTypes.rdf" ; static final String PREFERENCES_FILE = "prefs.js" ; static final String CHROME_DIR = "chrome" ; static final String LOCALSTORE_FILE = "localstore.rdf" ; static final String PROFILE_AFTER_CHANGE = "profile-after-change" ; static final String PROFILE_BEFORE_CHANGE = "profile-before-change" ; static final String PROFILE_DO_CHANGE = "profile-do-change" ; static final String SHUTDOWN_PERSIST = "shutdown-persist" ; static final String STARTUP = "startup" ; static final int STOP_PROPOGATE = 1 ; public Browser ( Composite parent , int style ) { } public static void clearSessions ( ) { } static int eventProc ( int handle , int gdkEvent , int pointer ) { } static Composite fixIM ( Composite parent ) { } int gtk_event ( int handle , int gdkEvent , int pointer ) { } public void addCloseWindowListener ( CloseWindowListener listener ) { } public void addLocationListener ( LocationListener listener ) { } public void addOpenWindowListener ( OpenWindowListener listener ) { } public void addProgressListener ( ProgressListener listener ) { } public void addStatusTextListener ( StatusTextListener listener ) { } public void addTitleListener ( TitleListener listener ) { } public void addVisibilityWindowListener ( VisibilityWindowListener listener ) { } public boolean back ( ) { } protected void checkSubclass ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } public boolean execute ( String script ) { } static Browser findBrowser ( int handle ) { } public boolean forward ( ) { } public String getUrl ( ) { } public boolean isBackEnabled ( ) { } public boolean isForwardEnabled ( ) { } static String error ( int code ) { } void onDispose ( Display display ) { } void Activate ( ) { } void Deactivate ( ) { } void onResize ( ) { } public void refresh ( ) { } public void removeCloseWindowListener ( CloseWindowListener listener ) { } public void removeLocationListener ( LocationListener listener ) { } public void removeOpenWindowListener ( OpenWindowListener listener ) { } public void removeProgressListener ( ProgressListener listener ) { } public void removeStatusTextListener ( StatusTextListener listener ) { } public void removeTitleListener ( TitleListener listener ) { } public void removeVisibilityWindowListener ( VisibilityWindowListener listener ) { } public boolean setText ( String html ) { } public boolean setUrl ( String url ) { } public void stop ( ) { } int QueryInterface ( int riid , int ppvObject ) { } int AddRef ( ) { } int Release ( ) { } int QueryReferent ( int riid , int ppvObject ) { } int GetInterface ( int riid , int ppvObject ) { } int GetWeakReference ( int ppvObject ) { } int OnStateChange ( int aWebProgress , int aRequest , int aStateFlags , int aStatus ) { } int OnProgressChange ( int aWebProgress , int aRequest , int aCurSelfProgress , int aMaxSelfProgress , int aCurTotalProgress , int aMaxTotalProgress ) { } int OnLocationChange ( int aWebProgress , int aRequest , int aLocation ) { } int OnStatusChange ( int aWebProgress , int aRequest , int aStatus , int aMessage ) { } int OnSecurityChange ( int aWebProgress , int aRequest , int state ) { } int SetStatus ( int statusType , int status ) { } int GetWebBrowser ( int aWebBrowser ) { } int SetWebBrowser ( int aWebBrowser ) { } int GetChromeFlags ( int aChromeFlags ) { } int SetChromeFlags ( int aChromeFlags ) { } int DestroyBrowserWindow ( ) { } int SizeBrowserTo ( int aCX , int aCY ) { size = new Point ( ( ( int ) ( aCX ) ) , ( ( int ) ( aCY ) ) ) ; if ( isModal ) { Shell shell = getShell ( ) ; <START_BUG> shell . setSize ( shell . computeSize ( aCX , aCY ) ) ; <END_BUG> } return XPCOM . NS_OK ; } int ShowAsModal ( ) { } int IsWindowModal ( int retval ) { } int ExitModalEventLoop ( int aStatus ) { } int SetDimensions ( int flags , int x , int y , int cx , int cy ) { } int GetDimensions ( int flags , int x , int y , int cx , int cy ) { } int SetFocus ( ) { } int GetVisibility ( int aVisibility ) { } int SetVisibility ( int aVisibility ) { } int GetTitle ( int aTitle ) { } int SetTitle ( int aTitle ) { } int GetSiteWindow ( int aSiteWindow ) { } int FocusNextElement ( ) { } int FocusPrevElement ( ) { } int OnShowContextMenu ( int aContextFlags , int aEvent , int aNode ) { } int OnStartURIOpen ( int aURI , int retval ) { } int DoContent ( int aContentType , int aIsContentPreferred , int aRequest , int aContentHandler , int retval ) { } int IsPreferred ( int aContentType , int aDesiredContentType , int retval ) { } int CanHandleContent ( int aContentType , int aIsContentPreferred , int aDesiredContentType , int retval ) { } int GetLoadCookie ( int aLoadCookie ) { } int SetLoadCookie ( int aLoadCookie ) { } int GetParentContentListener ( int aParentContentListener ) { } int SetParentContentListener ( int aParentContentListener ) { } int OnShowTooltip ( int aXCoords , int aYCoords , int aTipText ) { } int OnHideTooltip ( ) { } int GetFile ( int prop , int persistent , int retVal ) { } }

Fix:
shell . setSize ( shell . computeSize ( size . x , size . y ) ) ;