Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp |
| index 055c6f956ec22224c3c8f142a4fb242a28e23b90..1a7b4c6f6f23b94ed91a2b847032eb19f0501304 100644 |
| --- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp |
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp |
| @@ -116,6 +116,11 @@ bool IntersectionObservation::computeGeometry(IntersectionGeometry& geometry) |
| void IntersectionObservation::computeIntersectionObservations(double timestamp) |
| { |
| + // Pre-oilpan, there will be a delay between the time when the target Element gets deleted |
|
dcheng
2016/01/11 22:29:42
It's not accurate to imply that an Element and any
|
| + // (because its ref count dropped to zero) and when this IntersectionObservation gets |
| + // deleted (during the next gc run, because the target Element is the only thing keeping |
| + // the IntersectionObservation alive). During that interval, we need to check that m_target |
| + // hasn't been cleared. |
|
haraken
2016/01/12 00:01:37
Nit: This comment looks nice (so I want to keep it
|
| Element* targetElement = target(); |
| if (!targetElement || !isActive()) |
| return; |