Bug 1534608. MOZ_CAN_RUN_SCRIPT should disallow non-stack refptr arguments. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D23217
This commit is contained in:
Boris Zbarsky
2019-03-13 00:30:11 +00:00
parent ab666f45ea
commit b1439a9772
11 changed files with 161 additions and 79 deletions

View File

@@ -657,6 +657,16 @@ already_AddRefed<HTMLImageElement> HTMLImageElement::Image(
return img.forget();
}
uint32_t HTMLImageElement::Height() {
RefPtr<imgRequestProxy> currentRequest(mCurrentRequest);
return GetWidthHeightForImage(currentRequest).height;
}
uint32_t HTMLImageElement::Width() {
RefPtr<imgRequestProxy> currentRequest(mCurrentRequest);
return GetWidthHeightForImage(currentRequest).width;
}
uint32_t HTMLImageElement::NaturalHeight() {
uint32_t height = nsImageLoadingContent::NaturalHeight();