⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283345 in webkit


Ignore:
Timestamp:
Sep 30, 2021, 4:12:10 PM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r280861. rdar://problem/81757530

Deploy some more smart pointers in DOMWindow.cpp
https://bugs.webkit.org/show_bug.cgi?id=228883

Reviewed by Darin Adler.

A follow up to r279661. Deploy even more smart pointers.

  • page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): (WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener): (WebCore::DOMWindow::dispatchEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280861 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-611.4.2.0-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611.4.2.0-branch/Source/WebCore/ChangeLog

    r282033 r283345  
     12021-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
    1342021-09-03  Alan Coon  <alancoon@apple.com>
    235
  • branches/safari-611.4.2.0-branch/Source/WebCore/page/DOMWindow.cpp

    r282033 r283345  
    246246            continue;
    247247
    248         Frame* frame = window->frame();
     248        RefPtr frame = window->frame();
    249249        if (!frame)
    250250            continue;
     
    21042104        // Fire a fake DeviceMotionEvent with acceleration data to unblock the site's login flow.
    21052105        document()->postTask([](auto& context) {
    2106             if (auto* window = downcast<Document>(context).domWindow()) {
     2106            if (RefPtr window = downcast<Document>(context).domWindow()) {
    21072107                auto acceleration = DeviceMotionData::Acceleration::create();
    21082108                window->dispatchEvent(DeviceMotionEvent::create(eventNames().devicemotionEvent, DeviceMotionData::create(acceleration.copyRef(), acceleration.copyRef(), DeviceMotionData::RotationRate::create(), WTF::nullopt).ptr()));
     
    22612261    event.resetBeforeDispatch();
    22622262
    2263     Frame* protectedFrame = nullptr;
     2263    RefPtr<Frame> protectedFrame;
    22642264    bool hasListenersForEvent = false;
    22652265    if (UNLIKELY(InspectorInstrumentation::hasFrontends())) {
     
    22672267        hasListenersForEvent = hasEventListeners(event.type());
    22682268        if (hasListenersForEvent)
    2269             InspectorInstrumentation::willDispatchEventOnWindow(protectedFrame, event, *this);
     2269            InspectorInstrumentation::willDispatchEventOnWindow(protectedFrame.get(), event, *this);
    22702270    }
    22712271
     
    22752275
    22762276    if (hasListenersForEvent)
    2277         InspectorInstrumentation::didDispatchEventOnWindow(protectedFrame, event);
     2277        InspectorInstrumentation::didDispatchEventOnWindow(protectedFrame.get(), event);
    22782278
    22792279    event.resetAfterDispatch();
Note: See TracChangeset for help on using the changeset viewer.