Open Bug 1636353 Opened 5 years ago Updated 4 years ago

netmonitor be broken if dom.IntersectionObserver.enabled=false

Categories

(DevTools :: Netmonitor, defect, P2)

75 Branch
defect

Tracking

(firefox-esr68 unaffected, firefox75 wontfix, firefox76 wontfix, firefox77 wontfix, firefox78 fix-optional)

Tracking Status
firefox-esr68 --- unaffected
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- fix-optional

People

(Reporter: yfdyh000, Unassigned)

References

(Regression)

Details

(Keywords: regression)

What were you doing?

  1. set dom.IntersectionObserver.enabled to false.
  2. open netmonitor, reload the page.

What happened?

netmonitor becomes blank with no content.

ReferenceError: "IntersectionObserver is not defined"
componentDidMount resource://devtools/client/netmonitor/src/components/request-list/RequestListContent.js:131
React 13
onVisibilityChange resource://devtools/client/shared/components/VisibilityHandler.js:46
setIframeVisible resource://devtools/client/framework/toolbox.js:2652
selectSingleNode resource://devtools/client/framework/toolbox.js:2624
selectSingleNode resource://devtools/client/framework/toolbox.js:2604
selectTool resource://devtools/client/framework/toolbox.js:2706
onMouseDown resource://devtools/client/framework/components/ToolboxTab.js:79
React 19
react-dom.js:12769:13
TypeError: "this.intersectionObserver is null"
componentWillUnmount resource://devtools/client/netmonitor/src/components/request-list/RequestListContent.js:165
React 18
onVisibilityChange resource://devtools/client/shared/components/VisibilityHandler.js:46
setIframeVisible resource://devtools/client/framework/toolbox.js:2652
selectSingleNode resource://devtools/client/framework/toolbox.js:2624
selectSingleNode resource://devtools/client/framework/toolbox.js:2604
selectTool resource://devtools/client/framework/toolbox.js:2706
onMouseDown resource://devtools/client/framework/components/ToolboxTab.js:79
React 19
react-dom.js:12769:13
ReferenceError: IntersectionObserver is not defined
RequestListContent.js:131:5

What should have happened?

work fine.

Anything else we should know?

Some users have manually disabled this preference, according to https://github.com/ghacksuserjs/ghacks-user.js/blob/master/user.js.

Thanks for the report!

I can easily reproduce on my machine (Win10)

Honza

Severity: -- → S3
Has STR: --- → yes
Priority: -- → P2

:yfdyh000, since this bug is a regression, could you fill (if possible) the regressed_by field?
For more information, please visit auto_nag documentation.

Flags: needinfo?(yfdyh000)
No longer blocks: 1606514
Flags: needinfo?(yfdyh000)
Regressed by: 1606514
Has Regression Range: --- → yes

In general, I am not convinced of the value to add work arounds for disabled DOM APIs. We could warn if required APIs are not present and fail early, in case somebody wants to contribute that.

In this specific case, why would Intersection Observer be something users disable?

(In reply to :Harald Kirschner :digitarald from comment #3)

In general, I am not convinced of the value to add work arounds for disabled DOM APIs. We could warn if required APIs are not present and fail early, in case somebody wants to contribute that.

In this specific case, why would Intersection Observer be something users disable?

I don't know, it's just possible so someone does. it's up to you.

Some once privacy concerns: https://github.com/ghacksuserjs/ghacks-user.js/issues/737.

You need to log in before you can comment on or make changes to this bug.