Confirmed users, Bureaucrats and Sysops emeriti
1,680
edits
(→Status) |
|||
Line 42: | Line 42: | ||
In 'NPN_URLRedirectResponse', the applicable query getting the redirect is identified by the combination of 'instance' and 'notifyData'. If there are extant calls to NPN_GetURLNotify() or NPN_PostURLNotify() with particular values for 'instance' and 'notifyData' that have not finished, any subsequent calls to those with the same values of 'instance' and 'notifyData' will result in undefined behavior. | In 'NPN_URLRedirectResponse', the applicable query getting the redirect is identified by the combination of 'instance' and 'notifyData'. If there are extant calls to NPN_GetURLNotify() or NPN_PostURLNotify() with particular values for 'instance' and 'notifyData' that have not finished, any subsequent calls to those with the same values of 'instance' and 'notifyData' will result in undefined behavior. | ||
It is recommended that plugins always respond to redirect notifications as soon as possible because browsers will have to track outstanding requests. If a response is not received before the relevant plugin instance is destroyed then the outstanding request will be canceled upon destruction. | Plugins can respond from within 'NPP_URLRedirectNotify' but the API is asynchronous so this is not necessary. It is recommended that plugins always respond to redirect notifications as soon as possible because browsers will have to track outstanding requests. If a response is not received before the relevant plugin instance is destroyed then the outstanding request will be canceled upon destruction. | ||
There may be further redirect notifications when a redirect is allowed. When a redirect is disallowed the browser will subsequently issue an 'NPP_URLNotify' call with reason 'NPRES_USER_BREAK' and the last allowed or original url. | There may be further redirect notifications when a redirect is allowed. When a redirect is disallowed the browser will subsequently issue an 'NPP_URLNotify' call with reason 'NPRES_USER_BREAK' and the last allowed or original url. |