Skip to content
  • caseq@chromium.org's avatar
    Web Inspector: Calling getEventListeners() on element with malformed... · 93ef2805
    caseq@chromium.org authored
    Web Inspector: Calling getEventListeners() on element with malformed javascript event listeners crashes
    https://bugs.webkit.org/show_bug.cgi?id=93937
    
    Reviewed by Pavel Feldman.
    
    Source/WebCore:
    
    - check listener function to be non-null (happens upon an exception while compiling attribute listeners)
    
    * bindings/js/JSInjectedScriptHostCustom.cpp:
    (WebCore::getJSListenerFunctions):
    * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
    (WebCore::getJSListenerFunctions):
    
    LayoutTests:
    
    - added test for crash on invalid syntax in an attribute JS listener;
    - added custom expectation for chrome due to JS error logged to console by JSC while compiling attribute listener;
    
    * inspector/console/command-line-api-getEventListeners-expected.txt:
    * inspector/console/command-line-api-getEventListeners.html:
    * platform/chromium/inspector/console/command-line-api-getEventListeners-expected.txt: Copied from LayoutTests/inspector/console/command-line-api-getEventListeners-expected.txt.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    93ef2805