mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1152479 - Assert IsCallerChrome() in some layout-related nsIDOMWindowUtils APIs. r=ehsan
--HG-- extra : rebase_source : 137e10ca1f6c01825cd352c1bd2bcff9c9bf9d1e extra : source : 33e3ce1ae558eba912aad4487ff40d691ca4368e
This commit is contained in:
parent
80b5170af7
commit
3cb90b0f6f
@ -290,9 +290,7 @@ nsDOMWindowUtils::UpdateLayerTree()
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::SetCSSViewport(float aWidthPx, float aHeightPx)
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
|
||||
|
||||
if (!(aWidthPx >= 0.0 && aHeightPx >= 0.0)) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
@ -416,9 +414,7 @@ nsDOMWindowUtils::SetDisplayPortMarginsForElement(float aLeftMargin,
|
||||
nsIDOMElement* aElement,
|
||||
uint32_t aPriority)
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
|
||||
|
||||
nsIPresShell* presShell = GetPresShell();
|
||||
if (!presShell) {
|
||||
@ -510,9 +506,7 @@ nsDOMWindowUtils::SetResolution(float aResolution)
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::SetResolutionAndScaleTo(float aResolution)
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
|
||||
|
||||
nsIPresShell* presShell = GetPresShell();
|
||||
if (!presShell) {
|
||||
@ -587,9 +581,7 @@ nsDOMWindowUtils::GetIsFirstPaint(bool *aIsFirstPaint)
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetPresShellId(uint32_t *aPresShellId)
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
|
||||
|
||||
nsIPresShell* presShell = GetPresShell();
|
||||
if (presShell) {
|
||||
@ -3266,9 +3258,7 @@ nsDOMWindowUtils::GetPlugins(JSContext* cx, JS::MutableHandle<JS::Value> aPlugin
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::SetScrollPositionClampingScrollPortSize(float aWidth, float aHeight)
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
|
||||
|
||||
if (!(aWidth >= 0.0 && aHeight >= 0.0)) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
Loading…
Reference in New Issue
Block a user