gecko-dev/caps
Igor Bukanov 5a94b9c481 bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
2012-02-20 11:58:00 +01:00
..
idl bug 728250 - remove JSPrincipals::codebase. r=:luke,:bz 2012-03-09 10:48:50 +01:00
include bug 728250 - remove JSPrincipals::codebase. r=:luke,:bz 2012-03-09 10:48:50 +01:00
src bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00
tests/mochitest Bug 732413: make DISALLOW_INHERIT_PRINCIPAL flag passed to checkLoadURI effective even when the source principal is the system principal, r=bz 2012-03-14 11:55:47 -07:00
Makefile.in Bug 702388 - Convert Makefiles to use |TEST_DIRS += foo| r=khuey 2012-02-04 17:32:24 +00:00