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

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

Issue 2007983006: Rename OwnPtr::clear() to reset() in modules/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 5 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 ServiceWorkerRegistration::~ServiceWorkerRegistration() 111 ServiceWorkerRegistration::~ServiceWorkerRegistration()
112 { 112 {
113 } 113 }
114 114
115 void ServiceWorkerRegistration::dispose() 115 void ServiceWorkerRegistration::dispose()
116 { 116 {
117 // Promptly clears a raw reference from content/ to an on-heap object 117 // Promptly clears a raw reference from content/ to an on-heap object
118 // so that content/ doesn't access it in a lazy sweeping phase. 118 // so that content/ doesn't access it in a lazy sweeping phase.
119 m_handle.clear(); 119 m_handle.reset();
120 } 120 }
121 121
122 DEFINE_TRACE(ServiceWorkerRegistration) 122 DEFINE_TRACE(ServiceWorkerRegistration)
123 { 123 {
124 visitor->trace(m_installing); 124 visitor->trace(m_installing);
125 visitor->trace(m_waiting); 125 visitor->trace(m_waiting);
126 visitor->trace(m_active); 126 visitor->trace(m_active);
127 EventTargetWithInlineData::trace(visitor); 127 EventTargetWithInlineData::trace(visitor);
128 ActiveDOMObject::trace(visitor); 128 ActiveDOMObject::trace(visitor);
129 Supplementable<ServiceWorkerRegistration>::trace(visitor); 129 Supplementable<ServiceWorkerRegistration>::trace(visitor);
130 } 130 }
131 131
132 bool ServiceWorkerRegistration::hasPendingActivity() const 132 bool ServiceWorkerRegistration::hasPendingActivity() const
133 { 133 {
134 return !m_stopped; 134 return !m_stopped;
135 } 135 }
136 136
137 void ServiceWorkerRegistration::stop() 137 void ServiceWorkerRegistration::stop()
138 { 138 {
139 if (m_stopped) 139 if (m_stopped)
140 return; 140 return;
141 m_stopped = true; 141 m_stopped = true;
142 m_handle->registration()->proxyStopped(); 142 m_handle->registration()->proxyStopped();
143 } 143 }
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698