From b9bf1f716da3c224a77a2a9c21dd9bb400b9207a Mon Sep 17 00:00:00 2001 From: Nicolas Chevobbe Date: Wed, 28 Jun 2023 15:52:48 +0000 Subject: [PATCH] Bug 1840776 - [devtools] Fix inspector crash on ::highlight. r=devtools-reviewers,jdescottes. This prevent the rule view crashing when `dom.customHighlightAPI.enabled` is set to true. Differential Revision: https://phabricator.services.mozilla.com/D182327 --- devtools/server/actors/page-style.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devtools/server/actors/page-style.js b/devtools/server/actors/page-style.js index 9d7d8727a537..6187efa89710 100644 --- a/devtools/server/actors/page-style.js +++ b/devtools/server/actors/page-style.js @@ -689,6 +689,9 @@ class PageStyleActor extends Actor { case "::first-line": case "::selection": return true; + // We don't want the method to throw, but we don't handle those yet (See Bug 1840872) + case "::highlight": + return false; case "::marker": return this._nodeIsListItem(node); case "::backdrop":