Changeset 280861 in webkit
- Timestamp:
- Aug 10, 2021, 1:49:44 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/DOMWindow.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r280860 r280861 1 2021-08-10 Ryosuke Niwa <rniwa@webkit.org> 2 3 Deploy some more smart pointers in DOMWindow.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=228883 5 6 Reviewed by Darin Adler. 7 8 A follow up to r279661. Deploy even more smart pointers. 9 10 * page/DOMWindow.cpp: 11 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): 12 (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener): 13 (WebCore::DOMWindow::dispatchEvent): 14 1 15 2021-08-10 Antti Koivisto <antti@apple.com> 2 16 -
trunk/Source/WebCore/page/DOMWindow.cpp
r280504 r280861 249 249 continue; 250 250 251 Frame*frame = window->frame();251 RefPtr frame = window->frame(); 252 252 if (!frame) 253 253 continue; … … 2155 2155 // Fire a fake DeviceMotionEvent with acceleration data to unblock the site's login flow. 2156 2156 document()->postTask([](auto& context) { 2157 if ( auto*window = downcast<Document>(context).domWindow()) {2157 if (RefPtr window = downcast<Document>(context).domWindow()) { 2158 2158 auto acceleration = DeviceMotionData::Acceleration::create(); 2159 2159 window->dispatchEvent(DeviceMotionEvent::create(eventNames().devicemotionEvent, DeviceMotionData::create(acceleration.copyRef(), acceleration.copyRef(), DeviceMotionData::RotationRate::create(), std::nullopt).ptr())); … … 2312 2312 event.resetBeforeDispatch(); 2313 2313 2314 Frame* protectedFrame = nullptr;2314 RefPtr<Frame> protectedFrame; 2315 2315 bool hasListenersForEvent = false; 2316 2316 if (UNLIKELY(InspectorInstrumentation::hasFrontends())) { … … 2318 2318 hasListenersForEvent = hasEventListeners(event.type()); 2319 2319 if (hasListenersForEvent) 2320 InspectorInstrumentation::willDispatchEventOnWindow(protectedFrame , event, *this);2320 InspectorInstrumentation::willDispatchEventOnWindow(protectedFrame.get(), event, *this); 2321 2321 } 2322 2322 … … 2326 2326 2327 2327 if (hasListenersForEvent) 2328 InspectorInstrumentation::didDispatchEventOnWindow(protectedFrame , event);2328 InspectorInstrumentation::didDispatchEventOnWindow(protectedFrame.get(), event); 2329 2329 2330 2330 event.resetAfterDispatch();
Note:
See TracChangeset
for help on using the changeset viewer.