NPAPI:AsyncURLValues

From MozillaWiki
Revision as of 04:41, 4 September 2012 by Josh (talk | contribs) (Created page with "= Status = Under consideration. = Contributors = * Last modified: September 9, 2011 * Authors: Josh Aas (Mozilla Corporation) = Problem Summary = Some values provided via th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Status

Under consideration.

Contributors

  • Last modified: September 9, 2011
  • Authors: Josh Aas (Mozilla Corporation)

Problem Summary

Some values provided via the NPN_GetValueForURL API can result in main-thread i/o (notably: NPNURLVProxy). The purpose of this proposal is to allow for asynchronous retrieval of values.

Current Proposal

The following NPAPI functions will be added:

 NPN_AsyncGetValueForURL(NPP npp, NPNAsyncURLVariable variable, const char *url);
 NPP_AsyncReceiveValueForURL(char *value, uint32_t *len);

The API will use a new variable type in order to be clear about what values should be called via the async API. Supporting the synchronous API variables via the async API would not make it clear which variables browsers might require to be called via the async API.

For example - Mozilla plans to require that proxy information be requested via the async API. Mozilla would like it to be clear that this is recommended and supported, because a synchronous request would result in failure. Under this proposal, Mozilla can simply deprecate usage of NPNURLVProxy entirely, instead of insisting that it only be use in certain calls.

Open Issues

  • None