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) |