Open Bug 1126220 Opened 10 years ago Updated 2 years ago

DOMSubtreeModified event handler 100% CPU usage


(Core :: DOM: Events, defect, P5)

35 Branch
Windows 8.1





(Reporter:, Unassigned)


User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150122214805

Steps to reproduce:


  var oNode1 = document.createDocumentFragment();
  oNode1.textContent = 2;
  oNode1.addEventListener("DOMSubtreeModified", function(oEvent){"f"));
  }, true);
  var oNode2 = document.createDocumentFragment();

Actual results:

Page uses 100% CPU. When the appropriate warning dialog pops up, "Stop Script" does not stop the script. Effectively, the user cannot stop the CPU usage without closing the tab.

Expected results:

"Stop Script" should terminate the script and return CPU usage to normal.

Ideally, this infinitely loop should be detected and an exception should be thrown to prevent the CPU usage without user interaction: there is no valid use case for such a loop.
Component: Untriaged → DOM: Events
Product: Firefox → Core
Oh, we should remove DOMSubtreeModified somewhat soon, well all the mutation events.

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.