Changeset 283345 in webkit
- Timestamp:
- Sep 30, 2021, 4:12:10 PM (5 years ago)
- Location:
- branches/safari-611.4.2.0-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/DOMWindow.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-611.4.2.0-branch/Source/WebCore/ChangeLog
r282033 r283345 1 2021-09-30 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r280861. rdar://problem/81757530 4 5 Deploy some more smart pointers in DOMWindow.cpp 6 https://bugs.webkit.org/show_bug.cgi?id=228883 7 8 Reviewed by Darin Adler. 9 10 A follow up to r279661. Deploy even more smart pointers. 11 12 * page/DOMWindow.cpp: 13 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): 14 (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener): 15 (WebCore::DOMWindow::dispatchEvent): 16 17 18 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280861 268f45cc-cd09-0410-ab3c-d52691b4dbfc 19 20 2021-08-10 Ryosuke Niwa <rniwa@webkit.org> 21 22 Deploy some more smart pointers in DOMWindow.cpp 23 https://bugs.webkit.org/show_bug.cgi?id=228883 24 25 Reviewed by Darin Adler. 26 27 A follow up to r279661. Deploy even more smart pointers. 28 29 * page/DOMWindow.cpp: 30 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): 31 (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener): 32 (WebCore::DOMWindow::dispatchEvent): 33 1 34 2021-09-03 Alan Coon <alancoon@apple.com> 2 35 -
branches/safari-611.4.2.0-branch/Source/WebCore/page/DOMWindow.cpp
r282033 r283345 246 246 continue; 247 247 248 Frame*frame = window->frame();248 RefPtr frame = window->frame(); 249 249 if (!frame) 250 250 continue; … … 2104 2104 // Fire a fake DeviceMotionEvent with acceleration data to unblock the site's login flow. 2105 2105 document()->postTask([](auto& context) { 2106 if ( auto*window = downcast<Document>(context).domWindow()) {2106 if (RefPtr window = downcast<Document>(context).domWindow()) { 2107 2107 auto acceleration = DeviceMotionData::Acceleration::create(); 2108 2108 window->dispatchEvent(DeviceMotionEvent::create(eventNames().devicemotionEvent, DeviceMotionData::create(acceleration.copyRef(), acceleration.copyRef(), DeviceMotionData::RotationRate::create(), WTF::nullopt).ptr())); … … 2261 2261 event.resetBeforeDispatch(); 2262 2262 2263 Frame* protectedFrame = nullptr;2263 RefPtr<Frame> protectedFrame; 2264 2264 bool hasListenersForEvent = false; 2265 2265 if (UNLIKELY(InspectorInstrumentation::hasFrontends())) { … … 2267 2267 hasListenersForEvent = hasEventListeners(event.type()); 2268 2268 if (hasListenersForEvent) 2269 InspectorInstrumentation::willDispatchEventOnWindow(protectedFrame , event, *this);2269 InspectorInstrumentation::willDispatchEventOnWindow(protectedFrame.get(), event, *this); 2270 2270 } 2271 2271 … … 2275 2275 2276 2276 if (hasListenersForEvent) 2277 InspectorInstrumentation::didDispatchEventOnWindow(protectedFrame , event);2277 InspectorInstrumentation::didDispatchEventOnWindow(protectedFrame.get(), event); 2278 2278 2279 2279 event.resetAfterDispatch();
Note:
See TracChangeset
for help on using the changeset viewer.