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

Unified Diff: Source/modules/battery/NavigatorBattery.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: rebased 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
« no previous file with comments | « Source/modules/battery/NavigatorBattery.h ('k') | Source/modules/beacon/NavigatorBeacon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/battery/NavigatorBattery.cpp
diff --git a/Source/modules/battery/NavigatorBattery.cpp b/Source/modules/battery/NavigatorBattery.cpp
index 1cd4b3af742ef1b1458000f9e02c2c7bdfd7c8ff..c07fa7f465281f5387784551a0ee45fe15ef9516 100644
--- a/Source/modules/battery/NavigatorBattery.cpp
+++ b/Source/modules/battery/NavigatorBattery.cpp
@@ -14,10 +14,6 @@ NavigatorBattery::NavigatorBattery()
{
}
-NavigatorBattery::~NavigatorBattery()
-{
-}
-
ScriptPromise NavigatorBattery::getBattery(ScriptState* scriptState, Navigator& navigator)
{
return NavigatorBattery::from(navigator).getBattery(scriptState);
@@ -38,10 +34,10 @@ const char* NavigatorBattery::supplementName()
NavigatorBattery& NavigatorBattery::from(Navigator& navigator)
{
- NavigatorBattery* supplement = static_cast<NavigatorBattery*>(WillBeHeapSupplement<Navigator>::from(navigator, supplementName()));
+ NavigatorBattery* supplement = static_cast<NavigatorBattery*>(HeapSupplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
supplement = new NavigatorBattery();
- provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement));
+ provideTo(navigator, supplementName(), supplement);
}
return *supplement;
}
@@ -49,7 +45,7 @@ NavigatorBattery& NavigatorBattery::from(Navigator& navigator)
DEFINE_TRACE(NavigatorBattery)
{
visitor->trace(m_batteryManager);
- WillBeHeapSupplement<Navigator>::trace(visitor);
+ HeapSupplement<Navigator>::trace(visitor);
}
} // namespace blink
« no previous file with comments | « Source/modules/battery/NavigatorBattery.h ('k') | Source/modules/beacon/NavigatorBeacon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698