mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-05-31 09:41:37 +00:00
fix debug bustage, shutdown crash
This commit is contained in:
parent
5bcd1c4610
commit
be4d0ed865
|
@ -13876,9 +13876,15 @@ DocShellOriginAttributes
|
||||||
nsDocShell::GetOriginAttributes()
|
nsDocShell::GetOriginAttributes()
|
||||||
{
|
{
|
||||||
DocShellOriginAttributes attrs;
|
DocShellOriginAttributes attrs;
|
||||||
|
nsCOMPtr<nsIDocument> doc;
|
||||||
|
|
||||||
|
// It is possible to have a null document. If so, act as if we are
|
||||||
|
// the topmost docshell, since this usually occurs on shutdown.
|
||||||
RefPtr<nsDocShell> parent = GetParentDocshell();
|
RefPtr<nsDocShell> parent = GetParentDocshell();
|
||||||
if (parent) {
|
if (MOZ_LIKELY(parent))
|
||||||
nsCOMPtr<nsIPrincipal> parentPrin = parent->GetDocument()->NodePrincipal();
|
doc = parent->GetDocument();
|
||||||
|
if (MOZ_LIKELY(doc)) {
|
||||||
|
nsCOMPtr<nsIPrincipal> parentPrin = doc->NodePrincipal();
|
||||||
PrincipalOriginAttributes poa = BasePrincipal::Cast(parentPrin)->OriginAttributesRef();
|
PrincipalOriginAttributes poa = BasePrincipal::Cast(parentPrin)->OriginAttributesRef();
|
||||||
attrs.InheritFromDocToChildDocShell(poa);
|
attrs.InheritFromDocToChildDocShell(poa);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -681,7 +681,7 @@ JSDependentString::dumpRepresentation(FILE* fp, int indent) const
|
||||||
indent += 2;
|
indent += 2;
|
||||||
|
|
||||||
if (mozilla::Maybe<size_t> offset = baseOffset())
|
if (mozilla::Maybe<size_t> offset = baseOffset())
|
||||||
fprintf(fp, "%*soffset: %" PRIuSIZE "\n", indent, "", *offset);
|
fprintf(fp, "%*soffset: %zu\n", indent, "", *offset);
|
||||||
|
|
||||||
fprintf(fp, "%*sbase: ", indent, "");
|
fprintf(fp, "%*sbase: ", indent, "");
|
||||||
base()->dumpRepresentation(fp, indent);
|
base()->dumpRepresentation(fp, indent);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user