Re-land patch for bug 83536, merging principal objects.

Also includes fixes from bug 216041.
r=bzbarsky
sr=jst
This commit is contained in:
caillon@returnzero.com
2003-10-21 22:11:49 +00:00
parent f195a74536
commit 36e47e1b16
67 changed files with 1058 additions and 3040 deletions

View File

@@ -59,7 +59,6 @@
#include "nsIWebShell.h"
#include "nsIScriptSecurityManager.h"
#include "nsICodebasePrincipal.h"
#include "nsIURI.h"
#include "nsIURL.h"
@@ -203,12 +202,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