bug 771: Remember whether navigation was requested by user0.12/bug771
commit215408a60093b3fdd8d336da0227fffeeebd9bbb
authorKalle Olavi Niemitalo <kon@iki.fi>
Mon, 3 Aug 2009 23:38:25 +0000 (4 02:38 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Tue, 4 Aug 2009 00:11:16 +0000 (4 03:11 +0300)
tree40ab687ec2ba5c860f15cef3f85d2a7d4aa7e6a2
parentc189391f98f8f312e441560fcde56cc609751203
bug 771: Remember whether navigation was requested by user

Bug 771 is about onload scripts in web pages assigning window.location
at such a high rate that the user has no chance to ever interrupt the
loop.  The current plan for fixing that is to make each such change
increment session.redirect_cnt and refuse to navigate further when
that grows too high.

ses_goto() is the only function that resets session.redirect_cnt = 0.
It does so if the parameter int redir is zero.  Make all callers pass
this parameter as 1 if the navigation was requested by a web script.
15 files changed:
src/document/refresh.c
src/ecmascript/delayed-open.c
src/ecmascript/ecmascript.c
src/ecmascript/see/form.c
src/ecmascript/spidermonkey/form.c
src/protocol/auth/dialogs.c
src/session/task.c
src/session/task.h
src/viewer/action.c
src/viewer/text/form.c
src/viewer/text/form.h
src/viewer/text/link.c
src/viewer/text/link.h
src/viewer/text/search.c
src/viewer/text/view.c