firefox-devtools / devtools-core

:rocket: Packages for Firefox DevTools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop using unreliable isGrip

Loirooriol opened this issue · comments

The isGrip function is completely unreliable:

https://github.com/devtools-html/devtools-core/blob/e9238260b69412731d3f158444be5a10eb8f2658/packages/devtools-reps/src/reps/rep-utils.js#L15-L17

It should be removed in favor of the noGrip parameter.

Otherwise nasty bugs like https://bugzilla.mozilla.org/show_bug.cgi?id=1377668 may happen. Just fail fast and loud to detect what uses should pass noGrip = true, and otherwise assume it's a grip.