Bug 979658 part 1 - Add check that caller is chrome to GetOMTAOrComputedStyle; r=dzbarsky

Every other exposed method in nsDOMWindowUtils except getViewPortInfo and
getViewId performs this check. This patch makes getOMTAOrComputedStyle check the
caller is chrome as well.
This commit is contained in:
Brian Birtles 2014-03-10 13:47:11 +09:00
parent 7e77e27d54
commit 918d9a7839

View File

@ -3618,6 +3618,10 @@ nsDOMWindowUtils::GetOMTAOrComputedStyle(nsIDOMNode* aNode,
const nsAString& aProperty,
nsAString& aResult)
{
if (!nsContentUtils::IsCallerChrome()) {
return NS_ERROR_DOM_SECURITY_ERR;
}
aResult.Truncate();
ErrorResult rv;
nsCOMPtr<Element> element = do_QueryInterface(aNode);