Skip to content
  • kov@webkit.org's avatar
    [GTK] Insta-crash when closing browser with inspector window opened · 07d6d0ca
    kov@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=50744
    
    Reviewed by Martin Robinson.
    
    Source/WebKit/gtk:
    
    * GNUmakefile.am:
    * WebCoreSupport/InspectorClientGtk.cpp:
    (WebKit::InspectorClient::releaseFrontendPage): also let go of the
    frontend client when releasing the frontend page;
    (WebKit::InspectorFrontendClient::~InspectorFrontendClient(): Call releaseFrontendPage()
    like other ports do instead of just disconnectFrontendClient().
    (WebKit::InspectorFrontendClient::destroyInspectorWindow): Use GRefPtr for the
    inspector ref.
    (WebKit::InspectorFrontendClient::bringToFront): Adjust for GRefPtr usage.
    (WebKit::InspectorFrontendClient::attachWindow): Ditto.
    (WebKit::InspectorFrontendClient::detachWindow): Ditto.
    (WebKit::InspectorFrontendClient::inspectedURLChanged): Ditto.
    * WebCoreSupport/InspectorClientGtk.h:
    (InspectorFrontendClient): Use GRefPtr for inspector member.
    * tests/testwebinspector.c: Added. Test that killing a WebView with the inspector
    open does not crash, and that closing and reinspecting works.
    (quitLoop):
    (consoleMessageCallback):
    (inspectElementCallback):
    (closeInspector):
    (showInspector):
    (test_webkit_web_inspector_close_and_inspect):
    (test_webkit_web_inspector_destroy_inspected_web_view):
    (main):
    
    LayoutTests:
    
    * platform/gtk/Skipped: unskip inspector/debugger/open-close-open.html,
    which now passes.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    07d6d0ca