| Summary: | Browser#execute never returns if widget is never displayed | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Graham Mising name <eclipse> | ||||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | ivan | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 1.5 M6 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 210741 [details]
Patch to break out of loop
I posted a patch which seems to work in breaking out of the loop. Another possibility to to call SWT.error(SWT.ERROR_WIDGET_DISPOSED) instead of returning false. Created attachment 210744 [details]
Corrected patch
In creating the previous patch, the isDisposed check was put in the wrong place.
Created attachment 210782 [details]
Another solution
In this patch a disposed listener is added to the browser that cleans its internal state ( set executeResult to false ). Graham, could you give this patch a try?
Ivan's patch also resolves the issue. Applied second patch to CVS HEAD. JUnit test added. |
Build Identifier: CVS HEAD Browser#execute can be run before a widget is displayed and will continue the display's readAndDispatch until it receives a result. If the widget is disposed, no result will ever be received and this function never returns. Reproducible: Always Steps to Reproduce: 1. Create a Browser widget. 2. Call execute such as browser.execute("window.scrollTo(0, document.body.scrollHeight)"); 3. Dispose the widget before it is displayed 4. Note that the execute never returns.