Index: Source/modules/battery/NavigatorBattery.cpp |
diff --git a/Source/modules/battery/NavigatorBattery.cpp b/Source/modules/battery/NavigatorBattery.cpp |
index 612bb951e25d210bed10f56d2e179af06b12a6eb..c3416912f1198a2012e8815ee05d7581a8ed8677 100644 |
--- a/Source/modules/battery/NavigatorBattery.cpp |
+++ b/Source/modules/battery/NavigatorBattery.cpp |
@@ -37,12 +37,17 @@ const char* NavigatorBattery::supplementName() |
NavigatorBattery& NavigatorBattery::from(Navigator& navigator) |
{ |
- NavigatorBattery* supplement = static_cast<NavigatorBattery*>(Supplement<Navigator>::from(navigator, supplementName())); |
+ NavigatorBattery* supplement = static_cast<NavigatorBattery*>(WillBeHeapSupplement<Navigator>::from(navigator, supplementName())); |
if (!supplement) { |
supplement = new NavigatorBattery(); |
- provideTo(navigator, supplementName(), adoptPtr(supplement)); |
+ provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); |
} |
return *supplement; |
} |
+void NavigatorBattery::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_batteryManager); |
+} |
+ |
} // namespace WebCore |