mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
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:
parent
7e77e27d54
commit
918d9a7839
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user