diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 5afdde578c3..1df5517d919 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -23,6 +23,7 @@ #include "nsCOMPtr.h" #include "nsXPIDLString.h" #include "nsIHTMLContentSink.h" +#include "nsIInterfaceRequestor.h" #include "nsIParser.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoader.h" @@ -4752,8 +4753,13 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) nsIStreamLoader* loader; mDocument->GetDocumentLoadGroup(getter_AddRefs(loadGroup)); + + // supply a prompter if you have one. this allows modal dialogs put up + // from within this new stream loader to have proper parenting. but it's + // not fatal if there isn't a prompter. + nsCOMPtr promptcall(do_QueryInterface(mWebShell)); rv = NS_NewStreamLoader(&loader, mScriptURI, this, nsnull, loadGroup, - nsnull, nsIChannel::FORCE_RELOAD); + promptcall, nsIChannel::FORCE_RELOAD); if (NS_OK == rv) { rv = NS_ERROR_HTMLPARSER_BLOCK; } diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index 5afdde578c3..1df5517d919 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -23,6 +23,7 @@ #include "nsCOMPtr.h" #include "nsXPIDLString.h" #include "nsIHTMLContentSink.h" +#include "nsIInterfaceRequestor.h" #include "nsIParser.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoader.h" @@ -4752,8 +4753,13 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) nsIStreamLoader* loader; mDocument->GetDocumentLoadGroup(getter_AddRefs(loadGroup)); + + // supply a prompter if you have one. this allows modal dialogs put up + // from within this new stream loader to have proper parenting. but it's + // not fatal if there isn't a prompter. + nsCOMPtr promptcall(do_QueryInterface(mWebShell)); rv = NS_NewStreamLoader(&loader, mScriptURI, this, nsnull, loadGroup, - nsnull, nsIChannel::FORCE_RELOAD); + promptcall, nsIChannel::FORCE_RELOAD); if (NS_OK == rv) { rv = NS_ERROR_HTMLPARSER_BLOCK; }