Changeset 196110 in webkit


Ignore:
Timestamp:
Feb 3, 2016 11:34:55 PM (8 years ago)
Author:
Carlos Garcia Campos
Message:

[WTR] Crash in EventSendingController::contextClick() when context menu event is not handled
https://bugs.webkit.org/show_bug.cgi?id=153835

Reviewed by Martin Robinson.

WKBundlePageCopyContextMenuAtPointInWindow() returns nullptr when
the context menu event is not hanlded, but we are using the
returned value without null checking it.

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::EventSendingController::contextClick):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r196109 r196110  
     12016-02-03  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [WTR] Crash in EventSendingController::contextClick() when context menu event is not handled
     4        https://bugs.webkit.org/show_bug.cgi?id=153835
     5
     6        Reviewed by Martin Robinson.
     7
     8        WKBundlePageCopyContextMenuAtPointInWindow() returns nullptr when
     9        the context menu event is not hanlded, but we are using the
     10        returned value without null checking it.
     11
     12        * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
     13        (WTR::EventSendingController::contextClick):
     14
    1152016-02-03  Jason Marcell  <jmarcell@apple.com>
    216
  • trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp

    r189400 r196110  
    555555#endif
    556556    JSValueRef arrayResult = JSObjectMakeArray(context, 0, 0, 0);
     557    if (!menuEntries)
     558        return arrayResult;
     559
    557560    JSObjectRef arrayObj = JSValueToObject(context, arrayResult, 0);
    558561    size_t entriesSize = WKArrayGetSize(menuEntries.get());
Note: See TracChangeset for help on using the changeset viewer.