Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1427)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8ResizeObserverCallbackCustom.cpp

Issue 2605683002: Remove ActiveDOMCallback (Closed)
Patch Set: temp Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698