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 271576 Details for
Bug 527564
[Webkit2] Deadlock due to blocking javascript execution in a synchronous callback from webkit2
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 with minimum set of code to reproduce.
file_527564.txt (text/plain), 2.07 KB, created by
Leo Ufimtsev
on 2017-11-21 15:08:54 EST
(
hide
)
Description:
Snippet with minimum set of code to reproduce.
Filename:
MIME Type:
Creator:
Leo Ufimtsev
Created:
2017-11-21 15:08:54 EST
Size:
2.07 KB
patch
obsolete
>public class Bug527564_eval_hang { > > static int count = 0; > > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setSize(500, 600); > > shell.setLayout(new FillLayout()); > final Browser browser = new Browser(shell, SWT.None); > browser.setText("Hello 1"); >// Boolean retVal1 = (Boolean) browser.evaluate("return true"); // Eval doesn't cause it to hang, only function. > new CustomFunction (browser, "theJavaFunction"); > > final Browser browser2 = new Browser(shell, SWT.None); > browser2.setText("Hello 2"); >// Boolean retVal2 = (Boolean) browser2.evaluate("return true"); // Eval doesn't cause it to hang, only function. > new CustomFunction2 (browser2, "theJavaFunction2"); > > shell.open(); > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > display.dispose(); > } > > static class CustomFunction extends BrowserFunction { // copied from snippet 307 > CustomFunction (Browser browser, String name) { > super (browser, name); > } > @Override > public Object function (Object[] arguments) { > System.out.println ("theJavaFunction() called from javascript with args:"); > for (int i = 0; i < arguments.length; i++) { > Object arg = arguments[i]; > if (arg == null) { > System.out.println ("\t-->null"); > } else { > System.out.println ("\t-->" + arg.getClass ().getName () + ": " + arg.toString ()); > } > } > return arguments; > } > } > > static class CustomFunction2 extends BrowserFunction { // copied from snippet 307 > CustomFunction2 (Browser browser, String name) { > super (browser, name); > } > @Override > public Object function (Object[] arguments) { > System.out.println ("theJavaFunction() called from javascript with args:"); > for (int i = 0; i < arguments.length; i++) { > Object arg = arguments[i]; > if (arg == null) { > System.out.println ("\t-->null"); > } else { > System.out.println ("\t-->" + arg.getClass ().getName () + ": " + arg.toString ()); > } > } > return arguments; > } > } >}
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 527564
:
271575
| 271576