Skip to main content

Bug Tracker

Side navigation

#14080 closed bug (plugin)

Opened June 28, 2013 04:26PM UTC

Closed September 16, 2013 04:11PM UTC

Last modified September 18, 2013 07:47PM UTC

Running two JSONp calls with same jsonCallback simultaneous

Reported by: christian.meixner@bippesbrandao.de Owned by:
Priority: high Milestone: 1.11/2.1
Component: ajax Version: 2.0.2
Keywords: Cc: jaubourg
Blocked by: Blocking:
Description

Example:

http://jsfiddle.net/MPtn6/

if you run two calls to a JSONp with the same pre-specified jsonCallback simultaneously, the second call will end with error "<Methodename> is not a function"

Attachments (0)
Change History (4)

Changed June 29, 2013 07:08PM UTC by dmethvin comment:1

cc: → jaubourg
component: unfiledajax
milestone: None1.10.2/2.0.3
priority: undecidedhigh
status: newopen

Corrected repro: http://jsfiddle.net/MPtn6/1/

In a quick look at ajax/jsonp.js it looks like we're saving and restoring the original callback, but since there is already a request in flight we restore it incorrectly the second time.

Changed September 16, 2013 01:25AM UTC by dmethvin comment:2

milestone: 1.10.2/2.0.31.11/2.1

Changed September 16, 2013 04:11PM UTC by jaubourg comment:3

resolution: → plugin
status: openclosed

This was never supported nor is it supposed to be. If you want to do more advanced stuff with jsonp, use jQuery-JSONP: https://github.com/jaubourg/jquery-jsonp

Changed September 18, 2013 07:47PM UTC by anonymous comment:4

Is it "advanced" to have two JSONp calls running at the same time?

At least it would be nice, to have no error raised.