mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 10:40:12 +00:00
Bug 745495 - Fix crash when using screen object from removed iframe. r=smaug
This commit is contained in:
parent
69fa524c1a
commit
e9d72e0353
19
dom/base/crashtests/745495.html
Normal file
19
dom/base/crashtests/745495.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var frame = document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
|
||||
document.body.appendChild(frame);
|
||||
var frameScreen = frame.contentWindow.screen;
|
||||
document.body.removeChild(frame);
|
||||
frameScreen.top;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
@ -37,3 +37,4 @@ load 695867.html
|
||||
load 697643.html
|
||||
load 706283-1.html
|
||||
load 708405-1.html
|
||||
load 745495.html
|
||||
|
@ -3991,6 +3991,10 @@ nsLayoutUtils::GetRectDifferenceStrips(const nsRect& aR1, const nsRect& aR2,
|
||||
nsDeviceContext*
|
||||
nsLayoutUtils::GetDeviceContextForScreenInfo(nsPIDOMWindow* aWindow)
|
||||
{
|
||||
if (!aWindow) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
|
||||
while (docShell) {
|
||||
// Now make sure our size is up to date. That will mean that the device
|
||||
|
Loading…
x
Reference in New Issue
Block a user