Opened 10 years ago

Closed 10 years ago

#9495 closed defect (fixed)

[patch][cla] make registered dtds created by dojo.io.iframe.send() really cancellable

Reported by: remy damour Owned by: James Burke
Priority: high Milestone: 1.4
Component: IO Version: 1.3.1
Keywords: Cc:
Blocked By: Blocking:

Description

Hi,

from what I understand, dojo.io.iframe.send() is designed to queue all iframe requests one after another and treat them on a FIFO basis. Let's say I've made multiple requests (=> queued) and want to cancel one.

How do I do it? It looks like implemented dtd canceller on value returned by dojo.io.iframe.send() is NOT USED at all.(?) (by the way, there's a typo on 'canceled' property it sets to true (it should be 'cancelled' no?))

It would be so great if dojo.io.iframe._fireNextRequest performed a single check on dtds to be processed and simply ignores those with a 'cancelled' (or 'canceled') property set to true.

Attached is the patch against rev. 18622

Regards, Remy

Attachments (2)

iframe.rev18622.patch (1.0 KB) - added by remy damour 10 years ago.
correction of typo
iframe-rdcancellable_rev18622#9495_2.patch (3.4 KB) - added by remy damour 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by remy damour

Attachment: iframe.rev18622.patch added

correction of typo

comment:1 Changed 10 years ago by James Burke

Milestone: tbd1.4
Priority: highnormal

Seems straightforward enough. But just for good measure, do you have signed the Dojo CLA and sent that in?

comment:2 Changed 10 years ago by remy damour

New version of previous patch.

It occurs that if you cancel a scheduled dfd, _callNext() gets automatically called. This makes request of currently processed dfd to be stopped without any errBack or callBack being called and start the process of next dfd.

Therefore I simply added a condition to ensure that _callNext() is called only if cancelled dfd is currently processed dfd, so that dfd queue is still treated in fifo order and no disruption is generated.

Regards, Remy

Changed 10 years ago by remy damour

comment:3 Changed 10 years ago by James Burke

Summary: make registered dtds created by dojo.io.iframe.send() really cancellable[patch][cla] make registered dtds created by dojo.io.iframe.send() really cancellable

comment:4 Changed 10 years ago by James Burke

Resolution: fixed
Status: newclosed

(In [20390]) Fixes #9495: skip deferreds that have been canceled. Used a different fix than the ticket patch, dfd.canceled is the right spelling, and it seemed best to do the work in the fireNext function.

Note: See TracTickets for help on using tickets.