diff options
| author | Lars Magne Ingebrigtsen | 2012-03-25 15:38:22 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2012-03-25 15:38:22 +0200 |
| commit | e0fe1d55893865df47efceb68551c245f12ceda3 (patch) | |
| tree | fbe783a0bf64bff76f5d54c3df9f6ab40ca50f34 | |
| parent | dd470960273e61040446549c2f6c549c0fdb483a (diff) | |
| download | emacs-e0fe1d55893865df47efceb68551c245f12ceda3.tar.gz emacs-e0fe1d55893865df47efceb68551c245f12ceda3.zip | |
Fix race condition in url-queue when doing the callback
* url-queue.el (url-queue-kill-job): Check whether the buffer has
been killed asynchronously before selecting it.
| -rw-r--r-- | lisp/url/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/url/url-queue.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index ff6a6e6f805..d6e25188c69 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * url-queue.el (url-queue-kill-job): Check whether the buffer has | ||
| 4 | been killed asynchronously before selecting it. | ||
| 5 | |||
| 1 | 2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * url-queue.el (url-queue-kill-job): Make sure that the callback | 8 | * url-queue.el (url-queue-kill-job): Make sure that the callback |
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 46124717fed..917c787df29 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el | |||
| @@ -160,7 +160,8 @@ The variable `url-queue-timeout' sets a timeout." | |||
| 160 | ;; Call the callback with an error message to ensure that the caller | 160 | ;; Call the callback with an error message to ensure that the caller |
| 161 | ;; is notified that the job has failed. | 161 | ;; is notified that the job has failed. |
| 162 | (with-current-buffer | 162 | (with-current-buffer |
| 163 | (if (bufferp (url-queue-buffer job)) | 163 | (if (and (bufferp (url-queue-buffer job)) |
| 164 | (buffer-live-p (url-queue-buffer job))) | ||
| 164 | ;; Use the (partially filled) process buffer it it exists. | 165 | ;; Use the (partially filled) process buffer it it exists. |
| 165 | (url-queue-buffer job) | 166 | (url-queue-buffer job) |
| 166 | ;; If not, just create a new buffer, which will probably be | 167 | ;; If not, just create a new buffer, which will probably be |