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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h

Issue 1979953002: Remove OwnPtr::release() calls in modules/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ServiceWorkerRegistration_h 5 #ifndef ServiceWorkerRegistration_h
6 #define ServiceWorkerRegistration_h 6 #define ServiceWorkerRegistration_h
7 7
8 #include "bindings/core/v8/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/ActiveDOMObject.h" 10 #include "core/dom/ActiveDOMObject.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool m_stopped; 87 bool m_stopped;
88 }; 88 };
89 89
90 class ServiceWorkerRegistrationArray { 90 class ServiceWorkerRegistrationArray {
91 STATIC_ONLY(ServiceWorkerRegistrationArray); 91 STATIC_ONLY(ServiceWorkerRegistrationArray);
92 public: 92 public:
93 static HeapVector<Member<ServiceWorkerRegistration>> take(ScriptPromiseResol ver* resolver, Vector<OwnPtr<WebServiceWorkerRegistration::Handle>>* webServiceW orkerRegistrations) 93 static HeapVector<Member<ServiceWorkerRegistration>> take(ScriptPromiseResol ver* resolver, Vector<OwnPtr<WebServiceWorkerRegistration::Handle>>* webServiceW orkerRegistrations)
94 { 94 {
95 HeapVector<Member<ServiceWorkerRegistration>> registrations; 95 HeapVector<Member<ServiceWorkerRegistration>> registrations;
96 for (auto& registration : *webServiceWorkerRegistrations) 96 for (auto& registration : *webServiceWorkerRegistrations)
97 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver ->getExecutionContext(), registration.release())); 97 registrations.append(ServiceWorkerRegistration::getOrCreate(resolver ->getExecutionContext(), std::move(registration)));
98 return registrations; 98 return registrations;
99 } 99 }
100 }; 100 };
101 101
102 } // namespace blink 102 } // namespace blink
103 103
104 #endif // ServiceWorkerRegistration_h 104 #endif // ServiceWorkerRegistration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698