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

Unified Diff: third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp

Issue 1437883002: [Background Sync] Align exposed API with spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src@remove-periodic
Patch Set: Rebase Created 5 years, 1 month 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/background_sync/SyncCallbacks.cpp
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp b/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
index c0cd78e2147e25497f745ea0b814a96707589e34..41f5f31e394fedb622c6bd3db9e3fe532c1f0258 100644
--- a/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/background_sync/SyncCallbacks.cpp
@@ -120,20 +120,14 @@ SyncGetRegistrationsCallbacks::~SyncGetRegistrationsCallbacks()
void SyncGetRegistrationsCallbacks::onSuccess(const WebVector<WebSyncRegistration*>& webSyncRegistrations)
{
- Vector<OwnPtr<WebSyncRegistration>> registrations;
- for (WebSyncRegistration* r : webSyncRegistrations) {
- registrations.append(adoptPtr(r));
- }
jkarlin 2015/11/13 01:32:18 We now have a memory leak, webSyncRegistration's e
iclelland 2015/11/13 15:26:19 Maybe it's early and I haven't had enough coffee y
jkarlin 2015/11/13 17:00:42 My bad. I didn't realize that WebVector deleted it
if (!m_resolver->executionContext() || m_resolver->executionContext()->activeDOMObjectsAreStopped()) {
return;
}
-
- HeapVector<Member<SyncRegistration>> syncRegistrations;
- for (auto& r : registrations) {
- SyncRegistration* reg = SyncRegistration::take(m_resolver.get(), r.release(), m_serviceWorkerRegistration);
- syncRegistrations.append(reg);
+ Vector<String> tags;
+ for (WebSyncRegistration* r : webSyncRegistrations) {
jkarlin 2015/11/13 01:32:18 const WebSyncRegistration*
iclelland 2015/11/13 15:26:19 Done.
jkarlin 2015/11/13 17:00:42 I don't see the change.
iclelland 2015/11/13 20:49:24 Okay, *really* done now.
+ tags.append(r->tag);
}
- m_resolver->resolve(syncRegistrations);
+ m_resolver->resolve(tags);
}
void SyncGetRegistrationsCallbacks::onError(const WebSyncError& error)

Powered by Google App Engine
This is Rietveld 408576698