Bug 83536.

Merge script principal implementations into one class.
Should reduce footprint, speed up calls to caps a little bit, and fixes several memory leaks.
Also fixes bugs 211174 and 211263
r=jst@netscape.com
sr=bzbarsky@mit.edu
moa=mstoltz@netscape.com (he looked at an earlier patch and said it looked fine, and will do a retroactive review when he returns from vacation as well)
This commit is contained in:
caillon@returnzero.com
2003-07-24 05:15:20 +00:00
parent 45be713aac
commit 3c2c01c6d0
63 changed files with 1790 additions and 2924 deletions

View File

@@ -59,7 +59,6 @@
#include "nsIWebShell.h"
#include "nsIScriptSecurityManager.h"
#include "nsICodebasePrincipal.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
@@ -191,12 +190,8 @@ nsFrameLoader::LoadFrame()
// If we were called from script, get the referring URL from the script
if (principal) {
nsCOMPtr<nsICodebasePrincipal> codebase(do_QueryInterface(principal));
if (codebase) {
rv = codebase->GetURI(getter_AddRefs(referrer));
NS_ENSURE_SUCCESS(rv, rv);
}
rv = principal->GetURI(getter_AddRefs(referrer));
NS_ENSURE_SUCCESS(rv, rv);
// Pass the script principal to the docshell