moebius#187: DOM - nsIContentPolicy - context (document)

https://github.com/MoonchildProductions/moebius/pull/187
This commit is contained in:
janekptacijarabaci 2018-04-23 00:13:56 +02:00 committed by Roy Tam
commit 7f09dee539
6 changed files with 120 additions and 55 deletions

View file

@ -20,6 +20,7 @@
#include "nsIDOMElement.h"
#include "nsIDOMNode.h"
#include "nsIDOMWindow.h"
#include "nsITabChild.h"
#include "nsIContent.h"
#include "nsILoadContext.h"
#include "nsCOMArray.h"
@ -89,8 +90,9 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
{
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(requestingContext));
nsCOMPtr<nsIDOMWindow> window(do_QueryInterface(requestingContext));
NS_ASSERTION(!requestingContext || node || window,
"Context should be a DOM node or a DOM window!");
nsCOMPtr<nsITabChild> tabChild(do_QueryInterface(requestingContext));
NS_ASSERTION(!requestingContext || node || window || tabChild,
"Context should be a DOM node, DOM window or a tabChild!");
}
#endif