Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 266470 Details for
Bug 510183
[Webkit2] Internal browser hangs in WebKitGTK._swtWebkitEvaluateJavascript()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
snippet that hangs on webkit2
Bug510183_javadocHang.java (text/plain), 1.86 KB, created by
Leo Ufimtsev
on 2017-01-26 10:37:55 EST
(
hide
)
Description:
snippet that hangs on webkit2
Filename:
MIME Type:
Creator:
Leo Ufimtsev
Created:
2017-01-26 10:37:55 EST
Size:
1.86 KB
patch
obsolete
>package browser; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.browser.Browser; >import org.eclipse.swt.browser.LocationEvent; >import org.eclipse.swt.browser.LocationListener; >import org.eclipse.swt.browser.ProgressEvent; >import org.eclipse.swt.browser.ProgressListener; >import org.eclipse.swt.events.MouseEvent; >import org.eclipse.swt.events.MouseListener; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class Bug510183_javadocHang { > > public static int count = 0; > > public static void main(String[] args) { > Display display = new Display(); > final Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > Button button = new Button(shell, SWT.PUSH); > final Browser browser = new Browser(shell, SWT.NONE); > button.setText("Click to increase count."); > button.addMouseListener(new MouseListener() { > public void mouseUp(MouseEvent e) {} > public void mouseDown(MouseEvent e) { > shell.setText("Count: " + count++); > } > public void mouseDoubleClick(MouseEvent e) {} > }); > > browser.setText("<html><title>Snippet</title><body><a href=\"https://eclipse.org/\">Eclipse.org Disposing on link change causes hang</a></body></html>"); > browser.addProgressListener(new ProgressListener() { > @Override > public void completed(ProgressEvent event) { > browser.addLocationListener(new LocationListener() { > @Override > public void changing(LocationEvent event) { > browser.dispose(); /// If disposing a browser while it's changing location, causes hang. > } > @Override > public void changed(LocationEvent event) {} > }); > } > @Override > public void changed(ProgressEvent event) {} > }); > > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > display.dispose(); > > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 510183
: 266470