Files
Julian Descottes 438ab3f931 Bug 1934520 - [devtools] Avoid errors in document-events webconsole listeners for broken XML docs r=ochameau,devtools-reviewers
We used to try catch around calling DevToolsFrameParent.addOrSetSessionDataEntry but
when migrating to JSProcessActors, the try catch was removed.

One of the console listeners fails to start on broken XML documents which prevents
from using devtools at all on a page which contains an iframe with such a document.

The listener is updated to safely read the performance timing or use -1 if unavailable.

Test is added to cover toolbox opening in this case.

Differential Revision: https://phabricator.services.mozilla.com/D232193
2025-01-07 19:46:44 +00:00

11 lines
252 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test document with iframe containing a broken XML file</title>
</head>
<body>
<iframe src="doc_broken_xml.xml"></iframe>
<script type="text/javascript">console.log("foo after iframe")</script>
</body>
</html>