mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 930250 - Don't tear down XBL binding when element is in document. r=bz
This commit is contained in:
parent
c1faf91a37
commit
2c0f2038b4
8
content/base/crashtests/930250.html
Normal file
8
content/base/crashtests/930250.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<nobr>
|
||||
<h4 contenteditable="true">
|
||||
<iframe></iframe>
|
||||
<applet></applet>
|
||||
<nobr>
|
@ -146,5 +146,6 @@ load 849601.html
|
||||
skip-if(Android) load 851353-1.html
|
||||
load 863950.html
|
||||
load 864448.html
|
||||
load 930250.html
|
||||
load 942979.html
|
||||
load 978646.html
|
||||
|
@ -1264,7 +1264,17 @@ public:
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
mManager->RemovedFromDocumentInternal(mElement, mDoc);
|
||||
// It may be the case that the element was removed from the
|
||||
// DOM, causing this runnable to be created, then inserted back
|
||||
// into the document before the this runnable had a chance to
|
||||
// tear down the binding. Only tear down the binding if the element
|
||||
// is still no longer in the DOM. nsXBLService::LoadBinding tears
|
||||
// down the old binding if the element is inserted back into the
|
||||
// DOM and loads a different binding.
|
||||
if (!mElement->IsInDoc()) {
|
||||
mManager->RemovedFromDocumentInternal(mElement, mDoc);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user