diff options
| author | Lars Ingebrigtsen | 2015-12-25 06:19:34 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2015-12-25 17:03:34 +0100 |
| commit | 5b2401d38f52ca03c8b43cdfdf5a32ca73f10178 (patch) | |
| tree | 324864a739d2dc501e5c89a6c5450c4abe72cdce | |
| parent | ec2a509cfb9fe31a5929eac9c04d9dacca81ce82 (diff) | |
| download | emacs-5b2401d38f52ca03c8b43cdfdf5a32ca73f10178.tar.gz emacs-5b2401d38f52ca03c8b43cdfdf5a32ca73f10178.zip | |
Stop rendering HTML before specdlr exhaustion
Fixes: 22117
* shr.el (shr-descend): Stop rendering before we run out of
specpdl room (bug#22117).
Backport:
(cherry picked from commit 248da292fe46224b0b5a79b632c89cf4de2c2081)
| -rw-r--r-- | lisp/net/shr.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 8b51fc83f44..9e86ca9e0f9 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -425,8 +425,8 @@ size, and full-buffer size." | |||
| 425 | (shr-stylesheet shr-stylesheet) | 425 | (shr-stylesheet shr-stylesheet) |
| 426 | (shr-depth (1+ shr-depth)) | 426 | (shr-depth (1+ shr-depth)) |
| 427 | (start (point))) | 427 | (start (point))) |
| 428 | ;; shr uses about 12 frames per nested node. | 428 | ;; shr uses many frames per nested node. |
| 429 | (if (> shr-depth (/ max-specpdl-size 12)) | 429 | (if (> shr-depth (/ max-specpdl-size 15)) |
| 430 | (setq shr-warning "Too deeply nested to render properly; consider increasing `max-specpdl-size'") | 430 | (setq shr-warning "Too deeply nested to render properly; consider increasing `max-specpdl-size'") |
| 431 | (when style | 431 | (when style |
| 432 | (if (string-match "color\\|display\\|border-collapse" style) | 432 | (if (string-match "color\\|display\\|border-collapse" style) |