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

Unified Diff: Source/modules/serviceworkers/NavigatorServiceWorker.cpp

Issue 1101263003: Oilpan: have Navigator and its supplements be on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make NavigatorBeacon a frame observer instead Created 5 years, 8 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/serviceworkers/NavigatorServiceWorker.cpp
diff --git a/Source/modules/serviceworkers/NavigatorServiceWorker.cpp b/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
index 86aedc44da30a9c46aa28701d22ccd3ca6c63fca..89d9647a012d09a0abfca5d3dadf3f32b283966d 100644
--- a/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
+++ b/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
@@ -18,12 +18,14 @@ NavigatorServiceWorker::NavigatorServiceWorker(Navigator& navigator)
{
}
-DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(NavigatorServiceWorker);
+NavigatorServiceWorker::~NavigatorServiceWorker()
+{
+}
NavigatorServiceWorker* NavigatorServiceWorker::from(Document& document)
{
if (!document.frame() || !document.frame()->domWindow())
- return 0;
+ return nullptr;
Navigator& navigator = *document.frame()->domWindow()->navigator();
return &from(navigator);
}
@@ -33,7 +35,7 @@ NavigatorServiceWorker& NavigatorServiceWorker::from(Navigator& navigator)
NavigatorServiceWorker* supplement = toNavigatorServiceWorker(navigator);
if (!supplement) {
supplement = new NavigatorServiceWorker(navigator);
- provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement));
+ provideTo(navigator, supplementName(), supplement);
// Initialize ServiceWorkerContainer too.
supplement->serviceWorker();
}
@@ -42,7 +44,7 @@ NavigatorServiceWorker& NavigatorServiceWorker::from(Navigator& navigator)
NavigatorServiceWorker* NavigatorServiceWorker::toNavigatorServiceWorker(Navigator& navigator)
{
- return static_cast<NavigatorServiceWorker*>(WillBeHeapSupplement<Navigator>::from(navigator, supplementName()));
+ return static_cast<NavigatorServiceWorker*>(HeapSupplement<Navigator>::from(navigator, supplementName()));
}
const char* NavigatorServiceWorker::supplementName()
@@ -75,7 +77,7 @@ void NavigatorServiceWorker::willDetachGlobalObjectFromFrame()
DEFINE_TRACE(NavigatorServiceWorker)
{
visitor->trace(m_serviceWorker);
- WillBeHeapSupplement<Navigator>::trace(visitor);
+ HeapSupplement<Navigator>::trace(visitor);
DOMWindowProperty::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698