Changeset 152295 in webkit


Ignore:
Timestamp:
Jul 2, 2013 9:19:05 AM (11 years ago)
Author:
bw80.lee@samsung.com
Message:

Fix WebKitTestRunner crashes.
https://bugs.webkit.org/show_bug.cgi?id=117630

Reviewed by Darin Adler.

Create static function to dump for WebProcess unresponsiveness status,
and use it before calling TestController::runTest().

Accessing TestController::m_currentInvocation before calling
TestController::runTest() can make crash because the invocation
instance will be assigned at the function.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::run):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::dumpWebProcessUnresponsiveness):

  • WebKitTestRunner/TestInvocation.h:
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r152282 r152295  
     12013-07-02  Byungwoo Lee  <bw80.lee@samsung.com>
     2
     3        Fix WebKitTestRunner crashes.
     4        https://bugs.webkit.org/show_bug.cgi?id=117630
     5
     6        Reviewed by Darin Adler.
     7
     8        Create static function to dump for WebProcess unresponsiveness status,
     9        and use it before calling TestController::runTest().
     10
     11        Accessing TestController::m_currentInvocation before calling
     12        TestController::runTest() can make crash because the invocation
     13        instance will be assigned at the function.
     14
     15        * WebKitTestRunner/TestController.cpp:
     16        (WTR::TestController::run):
     17        * WebKitTestRunner/TestInvocation.cpp:
     18        (WTR::TestInvocation::dumpWebProcessUnresponsiveness):
     19        * WebKitTestRunner/TestInvocation.h:
     20
    1212013-07-02  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    222
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r151429 r152295  
    755755{
    756756    if (!resetStateToConsistentValues()) {
    757         m_currentInvocation->dumpWebProcessUnresponsiveness();
     757        TestInvocation::dumpWebProcessUnresponsiveness("<unknown> - TestController::run - Failed to reset state to consistent values\n");
    758758        return;
    759759    }
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r150098 r152295  
    277277void TestInvocation::dumpWebProcessUnresponsiveness()
    278278{
     279    dumpWebProcessUnresponsiveness(m_errorMessage.c_str());
     280}
     281
     282void TestInvocation::dumpWebProcessUnresponsiveness(const char* errorMessage)
     283{
    279284    const char* errorMessageToStderr = 0;
    280285#if PLATFORM(MAC)
     
    287292#endif
    288293
    289     dump(m_errorMessage.c_str(), errorMessageToStderr, true);
     294    dump(errorMessage, errorMessageToStderr, true);
    290295}
    291296
  • trunk/Tools/WebKitTestRunner/TestInvocation.h

    r139194 r152295  
    5050
    5151    void dumpWebProcessUnresponsiveness();
     52    static void dumpWebProcessUnresponsiveness(const char* errorMessage);
    5253    void outputText(const WTF::String&);
    5354private:
Note: See TracChangeset for help on using the changeset viewer.