NPAPI:ErrorReporting: Difference between revisions

Jump to navigation Jump to search
 
Line 29: Line 29:
* <code>flags</code>:
* <code>flags</code>:
** Future use, no flags defined now.
** Future use, no flags defined now.
* <code>pMemBlock</code>: The starting address of the memory block which must contain textual UTF8/ASCII data. Non-textual data can be encoded as text before it is placed in a registered block.
* <code>pMemBlock</code>: The starting address of the memory block.
* <code>sizeOfMemBlock</code>: The size of the memory block in bytes
* <code>sizeOfMemBlock</code>: The size of the memory block in bytes


Line 37: Line 37:
* <code>NPERR_INVALID_PARAM</code>: If the registration fails
* <code>NPERR_INVALID_PARAM</code>: If the registration fails
* <code>NPERR_NO_ERROR</code>: If successful
* <code>NPERR_NO_ERROR</code>: If successful
Registered buffers must contain textual UTF8/ASCII data which is <code>NULL</code> terminated. Non-textual data can be encoded as text before it is placed in a registered buffer.


The browser will not read a registered buffer upon registration, thus there is no need to re-register after changing the contents of a registered buffer. The buffer will only be read from a crash handler. Registering memory address <code>NULL</code> (zero) will not be allowed, to avoid the issue in which a plugin might register the result of a <code>malloc</code> call without a <code>NULL</code> check.
The browser will not read a registered buffer upon registration, thus there is no need to re-register after changing the contents of a registered buffer. The buffer will only be read from a crash handler. Registering memory address <code>NULL</code> (zero) will not be allowed, to avoid the issue in which a plugin might register the result of a <code>malloc</code> call without a <code>NULL</code> check.
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits

Navigation menu