| Index: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| index 5dc179ae350bbd66009dd9a5bb19d467b3400d3b..eade5171943781f148713d6be880359e56c06682 100644
|
| --- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
|
| @@ -54,7 +54,7 @@
|
| }
|
|
|
| private:
|
| - Member<ExecutionContext> m_context;
|
| + WeakMember<ExecutionContext> m_context;
|
| std::unique_ptr<IntersectionObserver::EventCallback> m_callback;
|
| };
|
|
|
| @@ -222,6 +222,7 @@
|
| Document& IntersectionObserver::trackingDocument() const {
|
| Document* document = nullptr;
|
| if (rootIsImplicit()) {
|
| + DCHECK(m_callback->getExecutionContext());
|
| document = toDocument(m_callback->getExecutionContext());
|
| } else {
|
| DCHECK(root());
|
| @@ -309,8 +310,10 @@
|
| void IntersectionObserver::computeIntersectionObservations() {
|
| if (!rootIsValid())
|
| return;
|
| - LocalDOMWindow* callbackDOMWindow =
|
| - toDocument(m_callback->getExecutionContext())->domWindow();
|
| + Document* callbackDocument = toDocument(m_callback->getExecutionContext());
|
| + if (!callbackDocument)
|
| + return;
|
| + LocalDOMWindow* callbackDOMWindow = callbackDocument->domWindow();
|
| if (!callbackDOMWindow)
|
| return;
|
| DOMHighResTimeStamp timestamp =
|
|
|