mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 17:22:04 +00:00
51842ef45e
Add checks to nsScriptSecurityManager::CheckCanListenTo that take a principal and ensure that the currently executing script code either is from the same origin as that principal or has the UniversalBrowserRead privilege enabled. (chrome code has all privileges enabled by default.) It's okay for the principal passed in to be null. That just signifies a privileged window/document that only can be listened to with privileges. I added GetPrincipal/SetPrincipal methods to nsIEventListenerManager. nsDocument::GetNewListenerManager sets a principal on the listener manager when it creates one. Obviously there are other places that create listener managers, but scripts seem to go through this one. Another change is to save some memory usage. Currently I allocate an array of PolicyType that is NS_DOM_PROP_MAX elements long. Unfortunately, compilers appear to allocate four bytes for each PolicyType, so the array takes around 2400 bytes. I've added changes to use two bit vectors that should consume about 1/16 that space. r=joki There are also changes that push nsnull onto the JSContext stack when entering a nested event loop. r=jband |
||
---|---|---|
.. | ||
macbuild | ||
.cvsignore | ||
Exceptions.cpp | ||
Exceptions.h | ||
FileGen.cpp | ||
FileGen.h | ||
geniid.pl | ||
gentags.pl | ||
IdlAttribute.cpp | ||
IdlAttribute.h | ||
IdlEnum.cpp | ||
IdlEnum.h | ||
IdlFunction.cpp | ||
IdlFunction.h | ||
IdlInterface.cpp | ||
IdlInterface.h | ||
IdlObject.cpp | ||
IdlObject.h | ||
IdlParameter.cpp | ||
IdlParameter.h | ||
IdlParser.cpp | ||
IdlParser.h | ||
IdlScanner.cpp | ||
IdlScanner.h | ||
IdlSpecification.cpp | ||
IdlSpecification.h | ||
IdlVariable.cpp | ||
IdlVariable.h | ||
JSStubGen.cpp | ||
JSStubGen.h | ||
main.cpp | ||
Makefile.in | ||
Makefile.win | ||
Test.idl | ||
XPCOMGen.cpp | ||
XPCOMGen.h |