gecko-dev/js/xpconnect
Igor Bukanov fba835a226 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
extra : rebase_source : f8f1536a86b7c3fe7296a16b6677bd21664af98a
2012-02-20 11:58:00 +01:00
..
crashtests Bug 705875 - Check for null IID pointers and references in XPCConvert. r=khuey 2011-12-01 18:24:28 -08:00
idl bug 730221 - delegating serialization of script principals to the embedding. r=:luke,:bz 2012-02-13 14:10:04 +01:00
loader bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00
public Backed out changeset 5f79a3dd45ff (bug 730318) r=bustage 2012-03-23 11:46:12 -07:00
shell Remove JS_GetScriptedCaller (bug 732652, r=luke,mrbkap,bholley,smaug,bent). 2012-03-06 15:33:12 -08:00
src bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke 2012-02-20 11:58:00 +01:00
tests Bug 735544 - Allow exception stacks to cross compartment boundaries. r=luke 2012-03-15 15:19:52 -07:00
wrappers Bug 733984 - Explicitly disallow shadowing on location wrappers. r=mrbkap 2012-03-23 15:58:18 -07:00
Makefile.in