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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp

Issue 2571193002: Signal no pending activity in destructed contexts. (Closed)
Patch Set: 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/modules/presentation/PresentationRequest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
index a378729c3c5f8cf76fe4928b0a89b293dda3fe2f..f2e47a5420b247e0128abd44fb2185d98722f57d 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -101,12 +101,9 @@ void PresentationRequest::addedEventListener(
}
bool PresentationRequest::hasPendingActivity() const {
- if (!getExecutionContext() || getExecutionContext()->isContextDestroyed())
- return false;
-
// Prevents garbage collecting of this object when not hold by another
// object but still has listeners registered.
- return hasEventListeners();
+ return getExecutionContext() && hasEventListeners();
}
ScriptPromise PresentationRequest::start(ScriptState* scriptState) {
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp ('k') | third_party/WebKit/Source/modules/sensor/Sensor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698