New issue
Advanced search Search tips

Issue 654082 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 647560



Sign in to add a comment

ElementVisbilityObserver::start crashes when called for an element outside the document

Project Member Reported by esprehn@chromium.org, Oct 7 2016

Issue description

The isInRemoteFrame check here is trying to crawl the frame tree, but if you're not even in the document yet, which is a totally valid way to use an IntersectionObserver, it'll crash because we can't tell if you're in a remote frame. The lower level IO API uses ExecutionContext for this, so it always grabs the frame's document instead.

From C++ we'll need to figure out how to make this work, but looking at the owner document of the element you're observing doesn't work because that document might have no frame (ex. <template> or document.implementation.createHTMLDocument()).

estark@ is trying to use ElementVisibilityObserver to observe password inputs, for now I suggest we just don't observe ones that originate from frameless documents since those are rare, but we need to figure out how to fix the ElementVisbilityObserver API itself here.
 
Cc: kenrb@chromium.org
Blocking: 647560
Owner: mlamouri@chromium.org
Status: Started (was: Untriaged)
Gave a shot at this while procrastinating on writing docs :)
Status: Fixed (was: Started)
https://codereview.chromium.org/2401303002/ fixed this.

Sign in to add a comment