Bug 1473865 part 2 - Remove unused nsContentUtils::GetDocumentFromCaller. r=bz

This commit is contained in:
Jan de Mooij 2018-07-09 12:26:49 +02:00
Родитель 6b3e0e4aee
Коммит 0f8c18a11f
2 изменённых файлов: 0 добавлений и 26 удалений

Просмотреть файл

@ -2231,20 +2231,6 @@ nsContentUtils::InProlog(nsINode *aNode)
return !root || doc->ComputeIndexOf(aNode) < doc->ComputeIndexOf(root);
}
nsIDocument*
nsContentUtils::GetDocumentFromCaller()
{
AutoJSContext cx;
nsCOMPtr<nsPIDOMWindowInner> win =
do_QueryInterface(nsJSUtils::GetStaticScriptGlobal(JS::CurrentGlobalOrNull(cx)));
if (!win) {
return nullptr;
}
return win->GetExtantDoc();
}
bool
nsContentUtils::IsCallerChrome()
{

Просмотреть файл

@ -630,18 +630,6 @@ public:
*/
static bool IsAbsoluteURL(const nsACString& aURL);
/**
* GetDocumentFromCaller gets its document by looking at the last called
* function and finding the document that the function itself relates to.
* For example, consider two windows A and B in the same origin. B has a
* function which does something that ends up needing the current document.
* If a script in window A were to call B's function, GetDocumentFromCaller
* would find that function (in B) and return B's document.
*
* @return The document or null if no JS Context.
*/
static nsIDocument* GetDocumentFromCaller();
// Check if a node is in the document prolog, i.e. before the document
// element.
static bool InProlog(nsINode *aNode);