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

Unified Diff: Source/modules/background_sync/SyncRegistration.cpp

Issue 1299903002: Reland of Call dispatcher's releaseRegistration when done with registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months 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: Source/modules/background_sync/SyncRegistration.cpp
diff --git a/Source/modules/background_sync/SyncRegistration.cpp b/Source/modules/background_sync/SyncRegistration.cpp
index 00783683f8245ffcb02b5fba2319c89df8b53fe6..64850cfa2435ec05ad3eccf30a4f1aa092d3a56a 100644
--- a/Source/modules/background_sync/SyncRegistration.cpp
+++ b/Source/modules/background_sync/SyncRegistration.cpp
@@ -48,6 +48,13 @@ SyncRegistration::SyncRegistration(int64_t id, const SyncRegistrationOptions& op
SyncRegistration::~SyncRegistration()
{
+ Platform* currentPlatform = Platform::current();
+ if (!currentPlatform)
+ return;
+ WebSyncProvider* syncProvider = currentPlatform->backgroundSyncProvider();
+ if (!syncProvider)
+ return;
+ syncProvider->releaseRegistration(m_id);
}
ScriptPromise SyncRegistration::done(ScriptState* scriptState)
« no previous file with comments | « Source/modules/background_sync/PeriodicSyncRegistration.cpp ('k') | public/platform/modules/background_sync/WebSyncProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698