mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 571428 - "ASSERTION: Can't be unbound without being bound originally"; r=roc
This commit is contained in:
parent
3debe38b84
commit
28ae2c2781
14
content/html/content/crashtests/571428-1.html
Normal file
14
content/html/content/crashtests/571428-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
var i = document.getElementById("i");
|
||||
i.setAttribute("type", "button");
|
||||
i.removeAttribute("type");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"><input id="i"></body>
|
||||
</html>
|
@ -15,3 +15,4 @@ load 504183-1.html
|
||||
load 515829-1.html
|
||||
load 515829-2.html
|
||||
load 570566-1.html
|
||||
load 571428-1.html
|
||||
|
@ -571,6 +571,7 @@ nsHTMLInputElement::FreeData()
|
||||
nsMemory::Free(mInputData.mValue);
|
||||
mInputData.mValue = nsnull;
|
||||
} else {
|
||||
UnbindFromFrame(nsnull);
|
||||
NS_IF_RELEASE(mInputData.mState);
|
||||
}
|
||||
}
|
||||
|
@ -1323,12 +1323,11 @@ nsTextEditorState::DestroyEditor()
|
||||
void
|
||||
nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame)
|
||||
{
|
||||
NS_ASSERTION(mBoundFrame, "Can't be unbound without being bound originally");
|
||||
NS_ENSURE_TRUE(mBoundFrame, );
|
||||
|
||||
// If it was, however, it should be unbounded from the same frame.
|
||||
NS_ASSERTION(aFrame == mBoundFrame, "Unbinding from the wrong frame");
|
||||
NS_ENSURE_TRUE(aFrame == mBoundFrame, );
|
||||
NS_ASSERTION(!aFrame || aFrame == mBoundFrame, "Unbinding from the wrong frame");
|
||||
NS_ENSURE_TRUE(!aFrame || aFrame == mBoundFrame, );
|
||||
|
||||
// We need to start storing the value outside of the editor if we're not
|
||||
// going to use it anymore, so retrieve it for now.
|
||||
|
Loading…
Reference in New Issue
Block a user