Bug 371132 - [BrowserFunction] Support calls to browser function while another browser function is pending
Summary: [BrowserFunction] Support calls to browser function while another browser fun...
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 15:13 EST by Cole Markham CLA
Modified: 2012-03-21 11:45 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cole Markham CLA 2012-02-09 15:13:06 EST
The current implementation throws an error in javascript when a browser function is called while another is pending. There should be a way to allow subsequent calls to be queued and execute when the previous is completed.
Comment 1 Ivan Furnadjiev CLA 2012-02-10 08:01:23 EST
Cole, could you outline a scenario where a browser function could be called when another is pending? As JavaScript is a single-treaded and execution is done in a synchronous request, for me this is only possible when browser function is called in the server response (probably by Browser#execute).
Comment 2 Cole Markham CLA 2012-03-20 15:03:07 EDT
I'm not sure what exactly is happening yet, but we are getting the error message on the client. We are using both Browser#execute and BrowserFunction for two-way communication between the iframe and RAP, so that could be causing the issue. Is it possible that the synchronous request is not truly synchronous and a user-initiated event (like a click) is processed in the iframe while the request is pending?
Comment 3 Cole Markham CLA 2012-03-21 11:45:04 EDT
It turns out it was caused by the BrowserFunction on the server side calling (very indirectly) a Browser#execute which triggered another call to the same BrowserFunction from javascript. It shouldn't be doing that for this case, so I fixed my code. I assume this behavior is not supported?