mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Gecko engine for Wine
fbeb82e29f
Currently to serialize principals stored in JSScript we have a rather complex schema. First there is the transcode callback that the embedding must provide to transcode principals using XDR API. Second we use rather complex glue code to implement that callback in terms of writing/reading nsIObjectOutputStream/ nsIObjectInputStream. This glue code is duplicated in 3 places. All this can be avoided if we simply delegate transcoding of principals to the caller. In addition, at least in the case of the cached startup scripts we do not even need to transcode the principals as the the cached scripts always have the system principal so we can skip all the transcode complexity there. The patch implemnts this idea. In particular, the code in JS engine responsible for transcoding of principals is replaced by the single API function JS_XDRSetPrincipals that the embedding can use to set principals for decoded scripts and functions. Then the startup cache uses this to set the principals for the decoded script to the system principals. The other two places in nsJSContext::Serialize and XBL_SerializeFunction that need to serialize principals together with a function or script now uses common utilities in nsXPConnect so the serialization complexity resides in the single place. |
||
---|---|---|
accessible | ||
b2g | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
content | ||
db/sqlite3 | ||
dbm | ||
docshell | ||
dom | ||
editor | ||
embedding | ||
extensions | ||
gfx | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
probes | ||
profile | ||
rdf | ||
security | ||
services | ||
src/test/java/org/mozilla/android/sync/repositories/domain | ||
startupcache | ||
storage | ||
testing | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe | ||
xulrunner | ||
.gitignore | ||
.hgignore | ||
.hgtags | ||
aclocal.m4 | ||
allmakefiles.sh | ||
client.mk | ||
client.py | ||
configure.in | ||
LEGAL | ||
LICENSE | ||
Makefile.in | ||
README.txt |
An explanation of the Mozilla Source Code Directory Structure and links to project pages with documentation can be found at: https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure For information on how to build Mozilla from the source code, see: http://developer.mozilla.org/en/docs/Build_Documentation To have your bug fix / feature added to Mozilla, you should create a patch and submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at: http://developer.mozilla.org/en/docs/Creating_a_patch http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree If you have a question about developing Mozilla, and can't find the solution on http://developer.mozilla.org, you can try asking your question in a mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups are accessible on Google Groups, or news.mozilla.org with a NNTP reader.] You can download nightly development builds from the Mozilla FTP server. Keep in mind that nightly builds, which are used by Mozilla developers for testing, may be buggy. Firefox nightlies, for example, can be found at: ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/ - or - http://nightly.mozilla.org/