Changeset 111770 in webkit
- Timestamp:
- Mar 22, 2012 3:03:20 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r111768 r111770 1 2012-03-22 Raphael Kubo da Costa <rakuco@FreeBSD.org> 2 3 Crash in fast/dom/navigator-detached-nocrash.html 4 https://bugs.webkit.org/show_bug.cgi?id=81773 5 6 Reviewed by Adam Barth. 7 8 BatteryManager::create() blindly assumes the Navigator* it 9 receives has a valid Frame, which is not always the case, as made 10 evident by the crashing test. 11 12 Follow abarth's suggestion and just stop 13 NavigatorBattery::webkitBattery() before it reaches the call to 14 BatteryManager::create() if that's the case. 15 16 No new tests, covered by fast/dom/navigator-detached-nocrash.html. 17 18 * Modules/battery/NavigatorBattery.cpp: 19 (WebCore::NavigatorBattery::webkitBattery): 20 1 21 2012-03-22 Emil A Eklund <eae@chromium.org> 2 22 -
trunk/Source/WebCore/Modules/battery/NavigatorBattery.cpp
r110991 r111770 40 40 BatteryManager* NavigatorBattery::webkitBattery(ScriptExecutionContext* context, Navigator* navigator) 41 41 { 42 if (!navigator->frame()) 43 return 0; 44 42 45 NavigatorBattery* navigatorBattery = NavigatorBattery::from(navigator); 43 46 if (!navigatorBattery->m_batteryManager)
Note: See TracChangeset
for help on using the changeset viewer.