Changeset 36763 in webkit


Ignore:
Timestamp:
Sep 22, 2008 6:27:51 AM (16 years ago)
Author:
vestbo@webkit.org
Message:

2008-09-22 Tor Arne Vestbø <tavestbo@trolltech.com>

Reviewed by Simon.

Initialize QCoreApplication in kjs binary/Shell.cpp

This allows us to use QCoreApplication::instance() to
get the main thread in ThreadingQt.cpp

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r36757 r36763  
     12008-09-22  Tor Arne Vestbø  <tavestbo@trolltech.com>
     2
     3        Reviewed by Simon.
     4
     5        Initialize QCoreApplication in kjs binary/Shell.cpp
     6       
     7        This allows us to use QCoreApplication::instance() to
     8        get the main thread in ThreadingQt.cpp
     9
     10        * kjs/Shell.cpp:
     11        (main):
     12        * wtf/ThreadingQt.cpp:
     13        (WTF::initializeThreading):
     14
    1152008-09-21  Darin Adler  <darin@apple.com>
    216
  • trunk/JavaScriptCore/kjs/Shell.cpp

    r36726 r36763  
    7070
    7171#if PLATFORM(QT)
     72#include <QCoreApplication>
    7273#include <QDateTime>
    7374#endif
     
    300301    _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
    301302    _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
     303#endif
     304
     305#if PLATFORM(QT)
     306    QCoreApplication app(argc, argv);
    302307#endif
    303308
  • trunk/JavaScriptCore/wtf/ThreadingQt.cpp

    r36745 r36763  
    3434#include "MathExtras.h"
    3535
    36 #if PLATFORM(DARWIN)
    3736#include <QCoreApplication>
    38 #endif
    3937#include <QMutex>
    4038#include <QThread>
     
    129127        threadMapMutex();
    130128        wtf_random_init();
    131 #if PLATFORM(DARWIN)
    132129        QThread* mainThread = QCoreApplication::instance()->thread();
    133130        mainThreadIdentifier = establishIdentifierForThread(mainThread);
    134 #else
    135         mainThreadIdentifier = currentThread();
    136 #endif
    137131        initializeMainThread();
    138132    }
Note: See TracChangeset for help on using the changeset viewer.