Index: third_party/WebKit/Source/bindings/core/v8/V8ResizeObserverCallbackCustom.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ResizeObserverCallbackCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ResizeObserverCallbackCustom.cpp |
index 88d364ba987a3d72894a5d1642bb7e3b45539405..c1642c55396820dd2d79407cb5c77945b29d0555 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8ResizeObserverCallbackCustom.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ResizeObserverCallbackCustom.cpp |
@@ -15,11 +15,11 @@ namespace blink { |
void V8ResizeObserverCallback::handleEvent( |
const HeapVector<Member<ResizeObserverEntry>>& entries, |
ResizeObserver* observer) { |
- if (!canInvokeCallback()) |
- return; |
- |
v8::Isolate* isolate = m_scriptState->isolate(); |
- |
+ ExecutionContext* executionContext = m_scriptState->getExecutionContext(); |
+ if (!executionContext || executionContext->isContextSuspended() || |
+ executionContext->isContextDestroyed()) |
+ return; |
if (!m_scriptState->contextIsValid()) |
return; |
ScriptState::Scope scope(m_scriptState.get()); |