2.) WebShell now implements the new nsIScriptGlobalObjectOwner.
3.) WebShell supports GetInterface to nsIScriptGlobalObject.
4.) Documents no longer carry around a reference to nsIScriptContextOwner. Instead they hold on to a nsIScriptGlobalObject. nsIDocument::GetScriptContextOwner has now become nsIDocument::GetScriptGlobalObject(). Same change to the set methods.
git-svn-id: svn://10.0.0.236/trunk@55175 18797224-902f-48f8-a5cc-f745e15eee43
and the infrastructure to hook it up.
This also changes the spelling from nsISelectionControler. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@55083 18797224-902f-48f8-a5cc-f745e15eee43
20257 unable to edit existing images in editor due to JS error
19933 JavaScript "window.location" core dumps in CAPS
Back out previous changes for enforcing security on listeners and go with a
simple restriction of access to the method for adding listeners.
r=mstoltz
git-svn-id: svn://10.0.0.236/trunk@54940 18797224-902f-48f8-a5cc-f745e15eee43
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
git-svn-id: svn://10.0.0.236/trunk@54477 18797224-902f-48f8-a5cc-f745e15eee43
r vidur@netscape.com
d Fixes the problem with memory leak in AppendData node when manipulating
comment nodes.
git-svn-id: svn://10.0.0.236/trunk@54337 18797224-902f-48f8-a5cc-f745e15eee43
forgot to add those classes in the QueryInterface method. god, i wish we
had a macro for that!
r=kmcclusk. thanks, kevin
git-svn-id: svn://10.0.0.236/trunk@54016 18797224-902f-48f8-a5cc-f745e15eee43
* Implement site-specific security policies (bug 858)
r=mstoltz
* Use Recycle rather than delete[] to clean up Purify logs
r=law
git-svn-id: svn://10.0.0.236/trunk@53631 18797224-902f-48f8-a5cc-f745e15eee43
already handles the trailing ';'.
NOTE: trying to compile a ';' fails on AIX
git-svn-id: svn://10.0.0.236/trunk@53239 18797224-902f-48f8-a5cc-f745e15eee43
r vidur
d Javascript should throw an execption on index size error. DOM now throws
an execption for size error.
git-svn-id: svn://10.0.0.236/trunk@53165 18797224-902f-48f8-a5cc-f745e15eee43
in anticipation of nixing NS_COMFALSE in the near future.
r=scc (please contact him should there be any build issues)
git-svn-id: svn://10.0.0.236/trunk@51977 18797224-902f-48f8-a5cc-f745e15eee43
r vidur
d fixes a problem where first character of the comment was being destroyed.
git-svn-id: svn://10.0.0.236/trunk@51796 18797224-902f-48f8-a5cc-f745e15eee43
and bug #16848: DOM Crash
- Removed extra NS_RELEASE(attrPrivate) call that was releasing
attrPrivate one too many times, and causing nsDOMAttributeMap::SetNamedItem() to crash.
r=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51716 18797224-902f-48f8-a5cc-f745e15eee43