mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
bug 78611. New XP threadsafe timer implementation. r=dougt sr=brendan
This commit is contained in:
parent
94f65e74a3
commit
15273ea50a
@ -47,7 +47,6 @@ SUB_LIBRARIES=\
|
||||
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\contentshared_s.lib \
|
||||
$(LIBNSPR) \
|
||||
|
@ -779,7 +779,6 @@ sub BuildClientDist()
|
||||
InstallFromManifest(":mozilla:widget:public:MANIFEST", "$distdirectory:widget:");
|
||||
InstallFromManifest(":mozilla:widget:public:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
InstallFromManifest(":mozilla:widget:src:mac:MANIFEST", "$distdirectory:widget:");
|
||||
InstallFromManifest(":mozilla:widget:timer:public:MANIFEST", "$distdirectory:widget:");
|
||||
|
||||
#RDF
|
||||
InstallFromManifest(":mozilla:rdf:base:idl:MANIFEST", "$distdirectory:idl:");
|
||||
|
@ -93,7 +93,6 @@ SUB_LIBRARIES=\
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\unicharutil_s.lib \
|
||||
$(DIST)\lib\js32$(VERSION_NUMBER).lib \
|
||||
!if defined(MOZ_PERF)
|
||||
|
@ -58,7 +58,6 @@ SUB_LIBRARIES=\
|
||||
|
||||
LLIBS = \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
|
@ -114,21 +114,6 @@ typedef MSG nsEmbedNativeEvent;
|
||||
|
||||
#ifdef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
|
||||
|
||||
/**
|
||||
* @fn nsresult NS_DoIdleEmbeddingStuff()
|
||||
*
|
||||
* This function should be called during the idle time in your application
|
||||
* or as each event is processed. This function ensures things such as
|
||||
* timers are fired correctly. It is recommended you call this function
|
||||
* even if has no perceived effect for your platform.
|
||||
*
|
||||
* @status UNDER_REVIEW
|
||||
*
|
||||
* @return NS_OK
|
||||
*/
|
||||
extern nsresult NS_DoIdleEmbeddingStuff();
|
||||
|
||||
|
||||
/**
|
||||
* @fn nsresult NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled)
|
||||
*
|
||||
|
@ -30,33 +30,6 @@
|
||||
|
||||
#ifdef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
|
||||
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsITimerQueue.h"
|
||||
|
||||
static NS_DEFINE_CID(kTimerManagerCID, NS_TIMERMANAGER_CID);
|
||||
|
||||
nsresult NS_DoIdleEmbeddingStuff()
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
nsCOMPtr<nsITimerQueue> timerQueue(do_GetService(kTimerManagerCID, &rv));
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (timerQueue->HasReadyTimers(NS_PRIORITY_LOWEST))
|
||||
{
|
||||
MSG wmsg;
|
||||
do
|
||||
{
|
||||
timerQueue->FireNextReadyTimer(NS_PRIORITY_LOWEST);
|
||||
} while (timerQueue->HasReadyTimers(NS_PRIORITY_LOWEST) &&
|
||||
!::PeekMessage(&wmsg, NULL, 0, 0, PM_NOREMOVE));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled)
|
||||
{
|
||||
aWasHandled = PR_FALSE;
|
||||
|
@ -3294,7 +3294,6 @@ void PrintListener::WaitForComplete()
|
||||
break;
|
||||
|
||||
// Do idle stuff
|
||||
::NS_DoIdleEmbeddingStuff();
|
||||
::MsgWaitForMultipleObjects(1, &hFakeEvent, FALSE, 500, QS_ALLEVENTS);
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,6 @@
|
||||
// ExitInstance() also takes care of cleaning up of
|
||||
// multiple browser frame windows on app exit
|
||||
//
|
||||
// NS_DoIdleEmbeddingStuff(); is called in the overridden
|
||||
// OnIdle() method
|
||||
//
|
||||
// Code to handle the creation of a new browser window
|
||||
|
||||
// Next suggested file to look at : BrowserFrm.cpp
|
||||
@ -438,8 +435,6 @@ BOOL CMfcEmbedApp::OnIdle(LONG lCount)
|
||||
{
|
||||
CWinApp::OnIdle(lCount);
|
||||
|
||||
NS_DoIdleEmbeddingStuff();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1387,8 +1387,6 @@ PRUint32 AppCallbacks::RunEventLoop(PRBool &aRunCondition)
|
||||
}
|
||||
|
||||
// Do idle stuff
|
||||
::NS_DoIdleEmbeddingStuff();
|
||||
|
||||
::MsgWaitForMultipleObjects(1, &hFakeEvent, FALSE, 100, QS_ALLEVENTS);
|
||||
}
|
||||
::CloseHandle(hFakeEvent);
|
||||
|
@ -82,7 +82,6 @@ LLIBS = \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
!if defined(NGLAYOUT_DDRAW)
|
||||
$(NGLAYOUT_DDRAW)\lib\ddraw.lib \
|
||||
!endif
|
||||
|
@ -80,12 +80,6 @@ LLIBS= $(LIBNSPR) \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(NULL)
|
||||
|
||||
!ifndef XPCOM_STANDALONE
|
||||
LLIBS= $(LLIBS) \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(NULL)
|
||||
!endif
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
libs:: $(DLL)
|
||||
|
@ -85,7 +85,6 @@ SUB_LIBRARIES= \
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\unicharutil_s.lib \
|
||||
$(DIST)\lib\js32$(VERSION_NUMBER).lib \
|
||||
!if defined(MOZ_PERF)
|
||||
|
@ -64,7 +64,6 @@ LLIBS= \
|
||||
!endif
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\js32$(VERSION_NUMBER).lib
|
||||
|
||||
|
@ -77,7 +77,6 @@ SUB_LIBRARIES= \
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\msgbsutl.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\rdfutil_s.lib \
|
||||
$(DIST)\lib\unicharutil_s.lib \
|
||||
$(LIBNSPR) \
|
||||
|
@ -68,7 +68,6 @@ LLIBS= \
|
||||
$(DIST)\lib\msgbsutl.lib \
|
||||
$(DIST)\lib\rdfutil_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
@ -47,7 +47,6 @@ SUB_LIBRARIES=\
|
||||
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\unicharutil_s.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
|
@ -44,7 +44,6 @@ SUB_LIBRARIES= \
|
||||
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -56,7 +56,6 @@ LCFLAGS = \
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
|
@ -57,7 +57,6 @@ LLIBS= \
|
||||
$(DIST)\lib\basedocshell_s.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\img32$(VERSION_NUMBER).lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\jsdom.lib \
|
||||
|
@ -88,7 +88,6 @@ OBJS = \
|
||||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\raptornativewidgets_s.lib \
|
||||
$(DIST)\lib\raptorbasewidget_s.lib \
|
||||
|
@ -90,8 +90,6 @@ static NS_DEFINE_CID(kCTransferableCID, NS_TRANSFERABLE_CID);
|
||||
static NS_DEFINE_IID(kDataFlavorCID, NS_DATAFLAVOR_CID);
|
||||
static NS_DEFINE_IID(kCHTMLFormatConverterCID, NS_HTMLFORMATCONVERTER_CID);
|
||||
static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID);
|
||||
static NS_DEFINE_IID(kCTimerCID, NS_TIMER_CID);
|
||||
static NS_DEFINE_IID(kCTimerManagerCID, NS_TIMERMANAGER_CID);
|
||||
static NS_DEFINE_IID(kSoundCID, NS_SOUND_CID);
|
||||
static NS_DEFINE_IID(kCFilePickerCID, NS_FILEPICKER_CID);
|
||||
static NS_DEFINE_IID(kCPopUpCID,NS_POPUP_CID);
|
||||
@ -153,19 +151,11 @@ NS_SetupRegistry()
|
||||
nsComponentManager::RegisterComponentLib(kCDragServiceCID, "Drag Service", "@mozilla.org/widget/dragservice;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kSoundCID, "Sound Services", "@mozilla.org/sound;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFilePickerCID, "FilePicker", "@mozilla.org/filepicker;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#ifdef XP_PC
|
||||
nsComponentManager::RegisterComponentLib(kCTimerCID, "Timer", "@mozilla.org/timer;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCTimerManagerCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
#ifdef IBMBIDI
|
||||
nsComponentManager::RegisterComponentLib(kCBidiKeyboardCID, "Bidi Keyboard", "@mozilla.org/widget/bidikeyboard;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
#ifdef XP_MAC
|
||||
nsComponentManager::RegisterComponentLib(kCTimerCID, "Timer", "@mozilla.org/timer;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
// WIDGETS
|
||||
nsComponentManager::RegisterComponentLib(kCLabelCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCButtonCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
|
@ -42,14 +42,10 @@
|
||||
#include "JSConsole.h"
|
||||
#include "plevent.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIThread.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsTimerManager.h"
|
||||
|
||||
JSConsole *gConsole;
|
||||
HINSTANCE gInstance, gPrevInstance;
|
||||
static nsITimer* gNetTimer;
|
||||
static NS_DEFINE_CID(kTimerManagerCID, NS_TIMERMANAGER_CID);
|
||||
|
||||
nsNativeViewerApp::nsNativeViewerApp()
|
||||
{
|
||||
@ -72,10 +68,6 @@ nsNativeViewerApp::Run()
|
||||
MSG msg;
|
||||
int keepGoing = 1;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsITimerQueue> queue(do_GetService(kTimerManagerCID, &rv));
|
||||
if (NS_FAILED(rv)) return 0;
|
||||
|
||||
// Pump all messages
|
||||
do {
|
||||
// Give priority to system messages (in particular keyboard, mouse,
|
||||
@ -95,15 +87,6 @@ nsNativeViewerApp::Run()
|
||||
}
|
||||
}
|
||||
|
||||
// process timer queue.
|
||||
} else if (queue->HasReadyTimers(NS_PRIORITY_LOWEST)) {
|
||||
|
||||
do {
|
||||
//printf("fire\n");
|
||||
queue->FireNextReadyTimer(NS_PRIORITY_LOWEST);
|
||||
} while (queue->HasReadyTimers(NS_PRIORITY_LOWEST) &&
|
||||
!::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE));
|
||||
|
||||
} else {
|
||||
// Block and wait for any posted application message
|
||||
::WaitMessage();
|
||||
|
@ -26,7 +26,7 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public timer src
|
||||
DIRS = public src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -105,16 +105,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::timer:src:mac:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::gfx:src:mac:</VALUE></SETTING>
|
||||
@ -1206,20 +1196,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -1496,16 +1472,6 @@
|
||||
<PATH>nsXPLookAndFeel.h</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -1630,16 +1596,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::timer:src:mac:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING>
|
||||
@ -2728,20 +2684,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -3016,16 +2958,6 @@
|
||||
<PATH>nsXPLookAndFeel.h</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -3135,16 +3067,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::timer:src:mac:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::gfx:src:mac:</VALUE></SETTING>
|
||||
@ -4236,20 +4158,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -4512,16 +4420,6 @@
|
||||
<PATH>nsXPLookAndFeel.h</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -4636,16 +4534,6 @@
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>::timer:src:mac:</VALUE></SETTING>
|
||||
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
|
||||
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
|
||||
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
|
||||
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
|
||||
</SETTING>
|
||||
<SETTING>
|
||||
<SETTING><NAME>SearchPath</NAME>
|
||||
<SETTING><NAME>Path</NAME><VALUE>:::dist:</VALUE></SETTING>
|
||||
@ -5734,20 +5622,6 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -6008,16 +5882,6 @@
|
||||
<PATH>nsXPLookAndFeel.h</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsHTMLFormatConverter.cpp</PATH>
|
||||
@ -6368,20 +6232,6 @@
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUP>
|
||||
<GROUP><NAME>Mac Timers</NAME>
|
||||
<FILEREF>
|
||||
<TARGETNAME>widgetDebug.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerPeriodical.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>widgetDebug.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUP>
|
||||
</GROUP>
|
||||
<GROUP><NAME>NS Libraries</NAME>
|
||||
<GROUP><NAME>Optimized</NAME>
|
||||
|
@ -22,6 +22,6 @@
|
||||
DEPTH=..
|
||||
|
||||
|
||||
DIRS=public timer src
|
||||
DIRS=public src
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -135,16 +135,6 @@
|
||||
{ 0xf6cd4f21, 0x53af, 0x11d2, \
|
||||
{ 0x8d, 0xc4, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } }
|
||||
|
||||
// {6B6C423A-1DD2-11B2-8888-E540BB169DDD}
|
||||
#define NS_TIMER_CID \
|
||||
{ 0x6b6c423a, 0x1dd2, 0x11b2, \
|
||||
{ 0x88, 0x88, 0xe5, 0x40, 0xbb, 0x16, 0x9d, 0xdd } }
|
||||
|
||||
// {7783D5A6-1DD2-11B2-BF5E-CA89083D0AA4}
|
||||
#define NS_TIMERMANAGER_CID \
|
||||
{ 0x7783d5a6, 0x1dd2, 0x11b2, \
|
||||
{ 0xbf, 0x5e, 0xca, 0x89, 0x8, 0x3d, 0xa, 0xa4 } }
|
||||
|
||||
//-----------------------------------------------------------
|
||||
//Drag & Drop & Clipboard
|
||||
//-----------------------------------------------------------
|
||||
|
@ -31,7 +31,6 @@ REQUIRES = xpcom \
|
||||
uconv \
|
||||
gfx \
|
||||
dom \
|
||||
timer \
|
||||
accessibility \
|
||||
$(NULL)
|
||||
|
||||
@ -66,7 +65,6 @@ WIN_LIBS= \
|
||||
SUB_LIBRARIES= \
|
||||
$(DIST)\lib\raptorbasewidget_s.lib \
|
||||
$(DIST)\lib\raptorwidget_s.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(NULL)
|
||||
|
||||
LLIBS= \
|
||||
|
@ -50,14 +50,11 @@
|
||||
#include "nsAppShell.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsSound.h"
|
||||
#include "nsITimer.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiKeyboard.h"
|
||||
#endif
|
||||
|
||||
#include "nsWindowsTimer.h"
|
||||
#include "nsTimerManager.h"
|
||||
|
||||
// Drag & Drop, Clipboard
|
||||
#include "nsClipboard.h"
|
||||
@ -80,8 +77,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimer)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerManager)
|
||||
#ifdef IBMBIDI
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
|
||||
#endif
|
||||
@ -208,14 +203,6 @@ static nsModuleComponentInfo components[] =
|
||||
// "@mozilla.org/widget/dragservice/win;1",
|
||||
"@mozilla.org/widget/dragservice;1",
|
||||
nsDragServiceConstructor },
|
||||
{ "Timer",
|
||||
NS_TIMER_CID,
|
||||
"@mozilla.org/timer;1",
|
||||
nsTimerConstructor },
|
||||
{ "Timer Manager",
|
||||
NS_TIMERMANAGER_CID,
|
||||
"@mozilla.org/widget/timermanager;1",
|
||||
nsTimerManagerConstructor },
|
||||
#ifdef IBMBIDI
|
||||
{ "Bidi Keyboard",
|
||||
NS_BIDIKEYBOARD_CID,
|
||||
@ -225,11 +212,4 @@ static nsModuleComponentInfo components[] =
|
||||
};
|
||||
|
||||
|
||||
PR_STATIC_CALLBACK(void)
|
||||
nsWidgetWinModuleDtor(nsIModule *self)
|
||||
{
|
||||
nsTimer::Shutdown();
|
||||
}
|
||||
|
||||
NS_IMPL_NSGETMODULE_WITH_DTOR(nsWidgetModule, components,
|
||||
nsWidgetWinModuleDtor)
|
||||
NS_IMPL_NSGETMODULE(nsWidgetModule, components)
|
||||
|
@ -82,7 +82,6 @@
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
#include "nsSound.h"
|
||||
#include "nsTimerMac.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiKeyboard.h"
|
||||
@ -90,7 +89,6 @@
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerImpl)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacWindow)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsButton)
|
||||
@ -124,10 +122,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "Timer",
|
||||
NS_TIMER_CID,
|
||||
"@mozilla.org/timer;1",
|
||||
nsTimerImplConstructor },
|
||||
{ "nsWindow",
|
||||
NS_WINDOW_CID,
|
||||
"@mozilla.org/widgets/window/mac;1",
|
||||
|
@ -43,14 +43,11 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include <windows.h>
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsITimerQueue.h"
|
||||
#ifdef MOZ_AIMM
|
||||
#include "aimm.h"
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kTimerManagerCID, NS_TIMERMANAGER_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsAppShell, nsIAppShell)
|
||||
|
||||
@ -98,10 +95,6 @@ NS_METHOD nsAppShell::Run(void)
|
||||
MSG msg;
|
||||
int keepGoing = 1;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsITimerQueue> queue(do_GetService(kTimerManagerCID, &rv));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
gKeepGoing = 1;
|
||||
// Process messages
|
||||
do {
|
||||
@ -122,15 +115,6 @@ NS_METHOD nsAppShell::Run(void)
|
||||
if (mDispatchListener)
|
||||
mDispatchListener->AfterDispatch();
|
||||
}
|
||||
|
||||
// process timer queue.
|
||||
} else if (queue->HasReadyTimers(NS_PRIORITY_LOWEST)) {
|
||||
|
||||
do {
|
||||
queue->FireNextReadyTimer(NS_PRIORITY_LOWEST);
|
||||
} while (queue->HasReadyTimers(NS_PRIORITY_LOWEST) &&
|
||||
!::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE));
|
||||
|
||||
} else {
|
||||
if (!gKeepGoing) {
|
||||
// In this situation, PostQuitMessage() was called, but the WM_QUIT
|
||||
@ -165,10 +149,6 @@ nsAppShell::GetNativeEvent(PRBool &aRealEvent, void *&aEvent)
|
||||
|
||||
BOOL gotMessage = false;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsITimerQueue> queue(do_GetService(kTimerManagerCID, &rv));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
do {
|
||||
// Give priority to system messages (in particular keyboard, mouse,
|
||||
// timer, and paint messages).
|
||||
@ -177,15 +157,6 @@ nsAppShell::GetNativeEvent(PRBool &aRealEvent, void *&aEvent)
|
||||
::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
|
||||
|
||||
gotMessage = true;
|
||||
|
||||
// process timer queue.
|
||||
} else if (queue->HasReadyTimers(NS_PRIORITY_LOWEST)) {
|
||||
|
||||
do {
|
||||
queue->FireNextReadyTimer(NS_PRIORITY_LOWEST);
|
||||
} while (queue->HasReadyTimers(NS_PRIORITY_LOWEST) &&
|
||||
!::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE));
|
||||
|
||||
} else {
|
||||
// Block and wait for any posted application message
|
||||
::WaitMessage();
|
||||
|
@ -95,7 +95,6 @@
|
||||
#include "nsWidgetsCID.h"
|
||||
|
||||
#include "nsITimer.h"
|
||||
#include "nsITimerQueue.h"
|
||||
|
||||
// For SetIcon
|
||||
#include "nsSpecialSystemDirectory.h"
|
||||
@ -114,7 +113,6 @@
|
||||
|
||||
static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID);
|
||||
static NS_DEFINE_IID(kRenderingContextCID, NS_RENDERING_CONTEXT_CID);
|
||||
static NS_DEFINE_CID(kTimerManagerCID, NS_TIMERMANAGER_CID);
|
||||
|
||||
// When we build we are currently (11/27/01) setting the WINVER to 0x0400
|
||||
// Which means we do not compile in the system resource for the HAND cursor
|
||||
@ -3097,28 +3095,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
DispatchStandardEvent(NS_DISPLAYCHANGED);
|
||||
break;
|
||||
|
||||
case WM_ENTERIDLE:
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsITimerQueue> queue =
|
||||
do_GetService(kTimerManagerCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
||||
if (queue->HasReadyTimers(NS_PRIORITY_LOWEST)) {
|
||||
|
||||
MSG wmsg;
|
||||
do {
|
||||
#ifdef DEBUG
|
||||
//printf("fire\n");
|
||||
#endif
|
||||
queue->FireNextReadyTimer(NS_PRIORITY_LOWEST);
|
||||
} while (queue->HasReadyTimers(NS_PRIORITY_LOWEST) &&
|
||||
!::PeekMessage(&wmsg, NULL, 0, 0, PM_NOREMOVE));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NOTIFY:
|
||||
// TAB change
|
||||
{
|
||||
|
@ -71,6 +71,9 @@
|
||||
#include "xptinfo.h"
|
||||
#include "nsIInterfaceInfoManager.h"
|
||||
|
||||
#include "nsTimerImpl.h"
|
||||
#include "TimerThread.h"
|
||||
|
||||
#include "nsThread.h"
|
||||
#include "nsProcess.h"
|
||||
|
||||
@ -127,6 +130,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSupportsInterfacePointerImpl)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsConsoleService);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAtomService);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExceptionService);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerImpl);
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsVariant);
|
||||
|
||||
@ -236,6 +240,8 @@ static nsModuleComponentInfo components[] = {
|
||||
#define NS_XPCOMPROXY_CID NS_PROXYEVENT_MANAGER_CID
|
||||
COMPONENT(XPCOMPROXY, nsProxyObjectManager::Create),
|
||||
|
||||
COMPONENT(TIMER, nsTimerImplConstructor),
|
||||
|
||||
#define COMPONENT_SUPPORTS(TYPE, Type) \
|
||||
COMPONENT(SUPPORTS_##TYPE, nsSupports##Type##ImplConstructor)
|
||||
|
||||
@ -552,6 +558,10 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr)
|
||||
// Shutdown nsLocalFile string conversion
|
||||
NS_ShutdownLocalFile();
|
||||
|
||||
// Shutdown the timer thread and all timers that might still be alive before
|
||||
// shutting down the component manager
|
||||
nsTimerImpl::Shutdown();
|
||||
|
||||
// Shutdown xpcom. This will release all loaders and cause others holding
|
||||
// a refcount to the component manager to release it.
|
||||
rv = (nsComponentManagerImpl::gComponentManager)->Shutdown();
|
||||
|
@ -1863,6 +1863,20 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>TimerThread.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerImpl.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@ -2460,6 +2474,16 @@
|
||||
<PATH>nsMemory.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>TimerThread.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerImpl.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
@ -4279,6 +4303,20 @@
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>TimerThread.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerImpl.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
@ -4881,6 +4919,16 @@
|
||||
<PATH>nsMemory.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>TimerThread.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerImpl.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
</TARGETLIST>
|
||||
@ -5528,6 +5576,18 @@
|
||||
<PATH>nsProcessMac.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>xpcom.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>TimerThread.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>xpcom.shlb</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsTimerImpl.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUP>
|
||||
<GROUP><NAME>proxy</NAME>
|
||||
<FILEREF>
|
||||
|
@ -42,13 +42,17 @@ CPPSRCS = \
|
||||
nsEventQueue.cpp \
|
||||
nsEventQueueService.cpp \
|
||||
nsThread.cpp \
|
||||
nsTimerImpl.cpp \
|
||||
nsProcessCommon.cpp \
|
||||
TimerThread.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsAutoLock.h \
|
||||
plevent.h \
|
||||
nsProcess.h \
|
||||
nsITimer.h \
|
||||
nsITimerCallback.h \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
|
240
xpcom/threads/TimerThread.cpp
Normal file
240
xpcom/threads/TimerThread.cpp
Normal file
@ -0,0 +1,240 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by the Initial Developer are
|
||||
* Copyright (C) 2001 the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*/
|
||||
|
||||
#include "nsTimerImpl.h"
|
||||
#include "TimerThread.h"
|
||||
|
||||
#include "nsAutoLock.h"
|
||||
#include "pratom.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(TimerThread, nsIRunnable)
|
||||
|
||||
#undef ACCEPT_WRONG_TIMES
|
||||
|
||||
#ifdef ACCEPT_WRONG_TIMES
|
||||
// allow the thread to wake up and process timers +/- 3ms of when they
|
||||
// are really supposed to fire.
|
||||
static const PRIntervalTime kThreeMS = PR_MillisecondsToInterval(3);
|
||||
#endif
|
||||
|
||||
TimerThread::TimerThread() :
|
||||
mCondVar(nsnull),
|
||||
mLock(nsnull),
|
||||
mProcessing(PR_FALSE),
|
||||
mWaiting(PR_FALSE)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
TimerThread::~TimerThread()
|
||||
{
|
||||
if (mCondVar)
|
||||
PR_DestroyCondVar(mCondVar);
|
||||
if (mLock)
|
||||
PR_DestroyLock(mLock);
|
||||
|
||||
mThread = nsnull;
|
||||
}
|
||||
|
||||
nsresult TimerThread::Init()
|
||||
{
|
||||
if (mThread)
|
||||
return NS_OK;
|
||||
|
||||
mLock = PR_NewLock();
|
||||
if (!mLock)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
mCondVar = PR_NewCondVar(mLock);
|
||||
if (!mCondVar)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
nsresult rv;
|
||||
mEventQueueService = do_GetService("@mozilla.org/event-queue-service;1", &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
// We hold on to mThread to keep the thread alive.
|
||||
rv = NS_NewThread(getter_AddRefs(mThread),
|
||||
NS_STATIC_CAST(nsIRunnable*, this),
|
||||
0,
|
||||
PR_JOINABLE_THREAD,
|
||||
PR_PRIORITY_NORMAL,
|
||||
PR_GLOBAL_THREAD);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult TimerThread::Shutdown()
|
||||
{
|
||||
if (!mThread)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
nsAutoLock lock(mLock);
|
||||
|
||||
mProcessing = PR_FALSE;
|
||||
|
||||
// notify the cond var so that Run() can return
|
||||
if (mCondVar && mWaiting)
|
||||
PR_NotifyCondVar(mCondVar);
|
||||
|
||||
nsTimerImpl *timer;
|
||||
for (PRInt32 i = mTimers.Count() - 1; i >= 0; i--) {
|
||||
timer = NS_STATIC_CAST(nsTimerImpl*, mTimers[i]);
|
||||
RemoveTimerInternal(timer);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void Run(); */
|
||||
NS_IMETHODIMP TimerThread::Run()
|
||||
{
|
||||
mProcessing = PR_TRUE;
|
||||
|
||||
while (mProcessing) {
|
||||
nsCOMPtr<nsTimerImpl> theTimer;
|
||||
|
||||
if (mTimers.Count() > 0) {
|
||||
nsAutoLock lock(mLock);
|
||||
nsTimerImpl *timer = NS_STATIC_CAST(nsTimerImpl*, mTimers[0]);
|
||||
|
||||
PRIntervalTime itIsNow = PR_IntervalNow();
|
||||
#ifdef ACCEPT_WRONG_TIMES
|
||||
if (itIsNow + kThreeMS > timer->mTimeout - kThreeMS) {
|
||||
#else
|
||||
if (itIsNow >= timer->mTimeout) {
|
||||
#endif
|
||||
RemoveTimerInternal(timer);
|
||||
theTimer = timer;
|
||||
}
|
||||
}
|
||||
|
||||
if (theTimer) {
|
||||
#ifdef DEBUG_TIMERS
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("Timer thread woke up %dms from when it was supposed to\n",
|
||||
((now > theTimer->mTimeout) ? PR_IntervalToMilliseconds(now - theTimer->mTimeout) :
|
||||
-(PRInt32)PR_IntervalToMilliseconds(theTimer->mTimeout - now))));
|
||||
#endif
|
||||
theTimer->Fire();
|
||||
}
|
||||
|
||||
nsAutoLock lock(mLock);
|
||||
|
||||
PRIntervalTime waitFor = PR_INTERVAL_NO_TIMEOUT;
|
||||
|
||||
if (mTimers.Count() > 0) {
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
PRIntervalTime timeout = NS_STATIC_CAST(nsTimerImpl *, mTimers[0])->mTimeout;
|
||||
|
||||
#ifdef ACCEPT_WRONG_TIMES
|
||||
if (timeout > now + kThreeMS)
|
||||
#else
|
||||
if (timeout > now)
|
||||
#endif
|
||||
waitFor = timeout - now;
|
||||
else
|
||||
waitFor = PR_INTERVAL_NO_WAIT;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_TIMERS
|
||||
if (waitFor == PR_INTERVAL_NO_TIMEOUT)
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("waiting for PR_INTERVAL_NO_TIMEOUT\n"));
|
||||
else if (waitFor == PR_INTERVAL_NO_WAIT)
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("waiting for PR_INTERVAL_NO_WAIT\n"));
|
||||
else
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("waiting for %u\n", PR_IntervalToMilliseconds(waitFor)));
|
||||
#endif
|
||||
|
||||
mWaiting = PR_TRUE;
|
||||
PR_WaitCondVar(mCondVar, waitFor);
|
||||
mWaiting = PR_FALSE;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult TimerThread::AddTimer(nsTimerImpl *aTimer)
|
||||
{
|
||||
nsAutoLock lock(mLock);
|
||||
|
||||
/* add the timer from our list */
|
||||
PRInt32 i = AddTimerInternal(aTimer);
|
||||
|
||||
if (mCondVar && mWaiting && i == 0)
|
||||
PR_NotifyCondVar(mCondVar);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult TimerThread::TimerDelayChanged(nsTimerImpl *aTimer)
|
||||
{
|
||||
nsAutoLock lock(mLock);
|
||||
|
||||
RemoveTimerInternal(aTimer);
|
||||
AddTimerInternal(aTimer);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult TimerThread::RemoveTimer(nsTimerImpl *aTimer)
|
||||
{
|
||||
nsAutoLock lock(mLock);
|
||||
|
||||
/* remove the timer from our list */
|
||||
RemoveTimerInternal(aTimer);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// This function must be called from within a lock
|
||||
PRInt32 TimerThread::AddTimerInternal(nsTimerImpl *aTimer)
|
||||
{
|
||||
PRInt32 count = mTimers.Count();
|
||||
PRInt32 i = 0;
|
||||
for (; i < count; i++) {
|
||||
nsTimerImpl *timer = NS_STATIC_CAST(nsTimerImpl *, mTimers[i]);
|
||||
|
||||
if (aTimer->mTimeout < timer->mTimeout) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
mTimers.InsertElementAt(aTimer, i);
|
||||
|
||||
return i;
|
||||
}
|
87
xpcom/threads/TimerThread.h
Normal file
87
xpcom/threads/TimerThread.h
Normal file
@ -0,0 +1,87 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by the Initial Developer are
|
||||
* Copyright (C) 2001 the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*/
|
||||
|
||||
#ifndef TimerThread_h___
|
||||
#define TimerThread_h___
|
||||
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIRunnable.h"
|
||||
#include "nsIThread.h"
|
||||
|
||||
#include "nsTimerImpl.h"
|
||||
|
||||
#include "nsVoidArray.h"
|
||||
|
||||
#include "prcvar.h"
|
||||
#include "prlock.h"
|
||||
|
||||
class TimerThread : public nsIRunnable
|
||||
{
|
||||
public:
|
||||
TimerThread();
|
||||
virtual ~TimerThread();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIRUNNABLE
|
||||
|
||||
nsresult Init();
|
||||
nsresult Shutdown();
|
||||
|
||||
nsresult AddTimer(nsTimerImpl *aTimer);
|
||||
nsresult TimerDelayChanged(nsTimerImpl *aTimer);
|
||||
nsresult RemoveTimer(nsTimerImpl *aTimer);
|
||||
|
||||
// For use by nsTimerImpl::Fire()
|
||||
nsCOMPtr<nsIEventQueueService> mEventQueueService;
|
||||
|
||||
private:
|
||||
// These two internal functions must be called from within a lock
|
||||
inline PRInt32 AddTimerInternal(nsTimerImpl *aTimer);
|
||||
inline void RemoveTimerInternal(nsTimerImpl *aTimer) {
|
||||
mTimers.RemoveElement(aTimer);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIThread> mThread;
|
||||
PRLock *mLock;
|
||||
PRCondVar *mCondVar;
|
||||
|
||||
PRPackedBool mProcessing;
|
||||
PRPackedBool mWaiting;
|
||||
|
||||
nsVoidArray mTimers;
|
||||
};
|
||||
|
||||
#endif /* TimerThread_h___ */
|
@ -33,6 +33,8 @@ EXPORTS = \
|
||||
nsAutoLock.h \
|
||||
plevent.h \
|
||||
nsProcess.h \
|
||||
nsITimer.h \
|
||||
nsITimerCallback.h \
|
||||
$(NULL)
|
||||
|
||||
NO_XPT_GEN=1
|
||||
@ -62,8 +64,10 @@ CPP_OBJS = \
|
||||
.\$(OBJDIR)\nsAutoLock.obj \
|
||||
.\$(OBJDIR)\nsEventQueue.obj \
|
||||
.\$(OBJDIR)\nsEventQueueService.obj \
|
||||
.\$(OBJDIR)\nsTimerImpl.obj \
|
||||
.\$(OBJDIR)\nsThread.obj \
|
||||
.\$(OBJDIR)\nsProcessCommon.obj \
|
||||
.\$(OBJDIR)\TimerThread.obj \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
155
xpcom/threads/nsITimer.h
Normal file
155
xpcom/threads/nsITimer.h
Normal file
@ -0,0 +1,155 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
* Michael Lowe <michael.lowe@bigfoot.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
#ifndef nsITimer_h___
|
||||
#define nsITimer_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
class nsITimer;
|
||||
class nsITimerCallback;
|
||||
|
||||
// Implementations of nsITimer should be written such that there are no limitations
|
||||
// on what can be called by the TimerCallbackFunc. On platforms like the Macintosh this
|
||||
// means that callback functions must be called from the main event loop NOT from
|
||||
// an interrupt.
|
||||
|
||||
/// Signature of timer callback function
|
||||
typedef void
|
||||
(*nsTimerCallbackFunc) (nsITimer *aTimer, void *aClosure);
|
||||
|
||||
/// Interface IID for nsITimer
|
||||
#define NS_ITIMER_IID \
|
||||
{ 0x497eed20, 0xb740, 0x11d1, \
|
||||
{ 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
|
||||
|
||||
// --- Timer priorities ---
|
||||
// These are going away, so just use NORMAL for now. See bug 115473
|
||||
#define NS_PRIORITY_HIGHEST 10
|
||||
#define NS_PRIORITY_HIGH 8
|
||||
#define NS_PRIORITY_NORMAL 5
|
||||
#define NS_PRIORITY_LOW 2
|
||||
#define NS_PRIORITY_LOWEST 0
|
||||
|
||||
// --- Timer types ---
|
||||
#define NS_TYPE_ONE_SHOT 0 // Timer which fires once only
|
||||
|
||||
#define NS_TYPE_REPEATING_SLACK 1 // After firing, timer is stopped and not
|
||||
// restarted until notifcation routine completes.
|
||||
// Specified timer period will be at least time between
|
||||
// when processing for last firing notifcation completes
|
||||
// and when the next firing occurs. This is the preferable
|
||||
// repeating type for most situations.
|
||||
|
||||
#define NS_TYPE_REPEATING_PRECISE 2 // Timer which aims to have constant time between firings.
|
||||
// The processing time for each timer notification should
|
||||
// not influence timer period. However, if the processing
|
||||
// for the last timer firing could not be completed until
|
||||
// just before the next firing occurs, then you could have
|
||||
// two timer notification routines being executed in quick
|
||||
// sucession.
|
||||
|
||||
#define REPEATING_TIMERS 1
|
||||
|
||||
/**
|
||||
* Timer class, used to invoke a function or method after a fixed
|
||||
* millisecond interval.
|
||||
*/
|
||||
class nsITimer : public nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMER_IID)
|
||||
|
||||
/**
|
||||
* Initialize a timer to fire after the given millisecond interval.
|
||||
* This version takes a function to call and a closure to pass to
|
||||
* that function.
|
||||
*
|
||||
* @param aFunc - The function to invoke
|
||||
* @param aClosure - an opaque pointer to pass to that function
|
||||
* @param aDelay - The millisecond interval
|
||||
* @param aPriority - The timer priority
|
||||
* @param aType - The timer type : one shot or repeating
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD Init(nsTimerCallbackFunc aFunc,
|
||||
void *aClosure,
|
||||
PRUint32 aDelay,
|
||||
PRUint32 aPriority = NS_PRIORITY_NORMAL,
|
||||
PRUint32 aType = NS_TYPE_ONE_SHOT) = 0;
|
||||
|
||||
/**
|
||||
* Initialize a timer to fire after the given millisecond interval.
|
||||
* This version takes an interface of type <code>nsITimerCallback</code>.
|
||||
* The <code>Notify</code> method of this method is invoked.
|
||||
*
|
||||
* @param aCallback - The interface to notify
|
||||
* @param aDelay - The millisecond interval
|
||||
* @param aPriority - The timer priority
|
||||
* @param aType - The timer type : one shot or repeating
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD Init(nsITimerCallback *aCallback,
|
||||
PRUint32 aDelay,
|
||||
PRUint32 aPriority = NS_PRIORITY_NORMAL,
|
||||
PRUint32 aType = NS_TYPE_ONE_SHOT) = 0;
|
||||
|
||||
/// Cancels the timeout
|
||||
NS_IMETHOD_(void) Cancel() = 0;
|
||||
|
||||
/// @return the millisecond delay of the timeout
|
||||
NS_IMETHOD_(PRUint32) GetDelay() = 0;
|
||||
|
||||
/// Change the millisecond interval for the timeout
|
||||
NS_IMETHOD_(void) SetDelay(PRUint32 aDelay) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32) GetPriority() = 0;
|
||||
NS_IMETHOD_(void) SetPriority(PRUint32 aPriority) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32) GetType() = 0;
|
||||
NS_IMETHOD_(void) SetType(PRUint32 aType) = 0;
|
||||
|
||||
/// @return the opaque pointer
|
||||
NS_IMETHOD_(void*) GetClosure() = 0;
|
||||
};
|
||||
|
||||
#endif // nsITimer_h___
|
63
xpcom/threads/nsITimerCallback.h
Normal file
63
xpcom/threads/nsITimerCallback.h
Normal file
@ -0,0 +1,63 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsITimerCallback_h___
|
||||
#define nsITimerCallback_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsITimer;
|
||||
|
||||
/// Interface IID for nsITimerCallback
|
||||
#define NS_ITIMERCALLBACK_IID \
|
||||
{ 0x5079b3a0, 0xb743, 0x11d1, \
|
||||
{ 0x9b, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }
|
||||
|
||||
/**
|
||||
* Interface implemented by users of the nsITimer class. An instance
|
||||
* of this interface is passed in when creating a timer. The Notify()
|
||||
* method of that instance is invoked after the specified delay.
|
||||
*/
|
||||
class nsITimerCallback : public nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMERCALLBACK_IID)
|
||||
|
||||
NS_IMETHOD_(void) Notify(nsITimer *timer) = 0;
|
||||
};
|
||||
|
||||
#endif
|
327
xpcom/threads/nsTimerImpl.cpp
Normal file
327
xpcom/threads/nsTimerImpl.cpp
Normal file
@ -0,0 +1,327 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by the Initial Developer are
|
||||
* Copyright (C) 2001 the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*/
|
||||
|
||||
#include "nsTimerImpl.h"
|
||||
#include "TimerThread.h"
|
||||
|
||||
#include "nsIEventQueue.h"
|
||||
|
||||
static TimerThread *gThread = nsnull;
|
||||
|
||||
#include "prmem.h"
|
||||
#include "prinit.h"
|
||||
|
||||
#ifdef DEBUG_TIMERS
|
||||
#include <math.h>
|
||||
|
||||
double nsTimerImpl::sDeltaSumSquared = 0;
|
||||
double nsTimerImpl::sDeltaSum = 0;
|
||||
double nsTimerImpl::sNum = 0;
|
||||
|
||||
static void
|
||||
myNS_MeanAndStdDev(double n, double sumOfValues, double sumOfSquaredValues,
|
||||
double *meanResult, double *stdDevResult)
|
||||
{
|
||||
double mean = 0.0, var = 0.0, stdDev = 0.0;
|
||||
if (n > 0.0 && sumOfValues >= 0) {
|
||||
mean = sumOfValues / n;
|
||||
double temp = (n * sumOfSquaredValues) - (sumOfValues * sumOfValues);
|
||||
if (temp < 0.0 || n <= 1)
|
||||
var = 0.0;
|
||||
else
|
||||
var = temp / (n * (n - 1));
|
||||
// for some reason, Windows says sqrt(0.0) is "-1.#J" (?!) so do this:
|
||||
stdDev = var != 0.0 ? sqrt(var) : 0.0;
|
||||
}
|
||||
*meanResult = mean;
|
||||
*stdDevResult = stdDev;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsTimerImpl, nsITimer)
|
||||
|
||||
|
||||
static PRStatus InitThread()
|
||||
{
|
||||
gThread = new TimerThread();
|
||||
if (!gThread) return PR_FAILURE;
|
||||
|
||||
gThread->AddRef();
|
||||
|
||||
nsresult rv = gThread->Init();
|
||||
if (NS_FAILED(rv)) return PR_FAILURE;
|
||||
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
|
||||
nsTimerImpl::nsTimerImpl() :
|
||||
mClosure(nsnull),
|
||||
mCallbackType(CALLBACK_TYPE_UNKNOWN),
|
||||
mFiring(PR_FALSE)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
nsIThread::GetCurrent(getter_AddRefs(mCallingThread));
|
||||
|
||||
static PRCallOnceType once;
|
||||
PR_CallOnce(&once, InitThread);
|
||||
|
||||
mCallback.c = nsnull;
|
||||
|
||||
#ifdef DEBUG_TIMERS
|
||||
mStart = 0;
|
||||
mStart2 = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsTimerImpl::~nsTimerImpl()
|
||||
{
|
||||
mClosure = nsnull;
|
||||
mCallback.c = nsnull;
|
||||
mCallbackType = CALLBACK_TYPE_UNKNOWN;
|
||||
|
||||
gThread->RemoveTimer(this);
|
||||
}
|
||||
|
||||
|
||||
void nsTimerImpl::Shutdown()
|
||||
{
|
||||
#ifdef DEBUG_TIMERS
|
||||
double mean = 0, stddev = 0;
|
||||
myNS_MeanAndStdDev(sNum, sDeltaSum, sDeltaSumSquared, &mean, &stddev);
|
||||
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("sNum = %f, sDeltaSum = %f, sDeltaSumSquared = %f\n", sNum, sDeltaSum, sDeltaSumSquared));
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("mean: %fms, stddev: %fms\n", mean, stddev));
|
||||
#endif
|
||||
|
||||
if (!gThread)
|
||||
return;
|
||||
|
||||
gThread->Shutdown();
|
||||
gThread->Release();
|
||||
gThread = nsnull;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsTimerImpl::Init(nsTimerCallbackFunc aFunc,
|
||||
void *aClosure,
|
||||
PRUint32 aDelay,
|
||||
PRUint32 aPriority,
|
||||
PRUint32 aType)
|
||||
{
|
||||
SetDelayInternal(aDelay);
|
||||
|
||||
mCallback.c = aFunc;
|
||||
mCallbackType = CALLBACK_TYPE_FUNC;
|
||||
|
||||
mClosure = aClosure;
|
||||
|
||||
mPriority = (PRUint8)aPriority;
|
||||
mType = (PRUint8)aType;
|
||||
|
||||
gThread->AddTimer(this);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsTimerImpl::Init(nsITimerCallback *aCallback,
|
||||
PRUint32 aDelay,
|
||||
PRUint32 aPriority,
|
||||
PRUint32 aType)
|
||||
{
|
||||
SetDelayInternal(aDelay);
|
||||
|
||||
mCallback.i = aCallback;
|
||||
mCallbackType = CALLBACK_TYPE_INTERFACE;
|
||||
|
||||
mPriority = (PRUint8)aPriority;
|
||||
mType = (PRUint8)aType;
|
||||
|
||||
gThread->AddTimer(this);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void) nsTimerImpl::Cancel()
|
||||
{
|
||||
mClosure = nsnull;
|
||||
mCallback.c = nsnull;
|
||||
mCallbackType = CALLBACK_TYPE_UNKNOWN;
|
||||
|
||||
gThread->RemoveTimer(this);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void) nsTimerImpl::SetDelay(PRUint32 aDelay)
|
||||
{
|
||||
SetDelayInternal(aDelay);
|
||||
|
||||
if (!mFiring)
|
||||
gThread->TimerDelayChanged(this);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void) nsTimerImpl::SetPriority(PRUint32 aPriority)
|
||||
{
|
||||
mPriority = (PRUint8)aPriority;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(void) nsTimerImpl::SetType(PRUint32 aType)
|
||||
{
|
||||
mType = (PRUint8)aType;
|
||||
// XXX if this is called, we should change the actual type.. this could effect
|
||||
// repeating timers. we need to ensure in Process() that if mType has changed
|
||||
// during the callback that we don't end up with the timer in the queue twice.
|
||||
}
|
||||
|
||||
void nsTimerImpl::Process()
|
||||
{
|
||||
#ifdef DEBUG_TIMERS
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
PRIntervalTime a = now - mStart; // actual delay in intervals
|
||||
PRUint32 b = PR_MillisecondsToInterval(mDelay); // expected delay in intervals
|
||||
PRUint32 d = PR_IntervalToMilliseconds((a > b) ? a - b : 0); // delta in ms
|
||||
sDeltaSum += d;
|
||||
sDeltaSumSquared += double(d) * double(d);
|
||||
sNum++;
|
||||
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("[this=%p] expected delay time %dms\n", this, mDelay));
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("[this=%p] actual delay time %dms\n", this, PR_IntervalToMilliseconds(a)));
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("[this=%p] -------\n", this));
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("[this=%p] delta %dms\n", this, d));
|
||||
|
||||
mStart = mStart2;
|
||||
mStart2 = 0;
|
||||
#endif
|
||||
|
||||
mFiring = PR_TRUE;
|
||||
|
||||
if (mCallback.c) {
|
||||
if (mCallbackType == CALLBACK_TYPE_FUNC)
|
||||
(*mCallback.c)(this, mClosure);
|
||||
else if (mCallbackType == CALLBACK_TYPE_INTERFACE)
|
||||
mCallback.i->Notify(this);
|
||||
/* else the timer has been canceled, and we shouldn't do anything */
|
||||
}
|
||||
|
||||
mFiring = PR_FALSE;
|
||||
|
||||
#ifdef DEBUG_TIMERS
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("[this=%p] Took %dms to fire process timer callback\n", this,
|
||||
PR_IntervalToMilliseconds(PR_IntervalNow() - now)));
|
||||
#endif
|
||||
|
||||
if (mType == NS_TYPE_REPEATING_SLACK) {
|
||||
SetDelayInternal(mDelay); // force mTimeout to be recomputed.
|
||||
gThread->AddTimer(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct MyEventType {
|
||||
PLEvent e;
|
||||
// arguments follow...
|
||||
#ifdef DEBUG_TIMERS
|
||||
PRIntervalTime mInit;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
void* handleMyEvent(MyEventType* event)
|
||||
{
|
||||
#ifdef DEBUG_TIMERS
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
PR_LOG(gTimerLog, PR_LOG_DEBUG, ("[this=%p] time between Fire() and Process(): %dms\n",
|
||||
event->e.owner, PR_IntervalToMilliseconds(now - event->mInit)));
|
||||
#endif
|
||||
NS_STATIC_CAST(nsTimerImpl*, event->e.owner)->Process();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void destroyMyEvent(MyEventType* event)
|
||||
{
|
||||
nsTimerImpl *timer = NS_STATIC_CAST(nsTimerImpl*, event->e.owner);
|
||||
NS_RELEASE(timer);
|
||||
PR_DELETE(event);
|
||||
}
|
||||
|
||||
|
||||
void nsTimerImpl::Fire()
|
||||
{
|
||||
// XXX we may want to reuse the PLEvent in the case of repeating timers.
|
||||
MyEventType* event;
|
||||
|
||||
// construct
|
||||
event = PR_NEW(MyEventType);
|
||||
if (event == NULL) return;
|
||||
|
||||
// initialize
|
||||
PL_InitEvent((PLEvent*)event, this,
|
||||
(PLHandleEventProc)handleMyEvent,
|
||||
(PLDestroyEventProc)destroyMyEvent);
|
||||
|
||||
NS_ADDREF(this);
|
||||
#ifdef DEBUG_TIMERS
|
||||
event->mInit = PR_IntervalNow();
|
||||
#endif
|
||||
|
||||
// If this is a repeating precise timer, we need to calulate the time for the next timer to fire
|
||||
// prior to making the callback.
|
||||
if (mType == NS_TYPE_REPEATING_PRECISE) {
|
||||
SetDelayInternal(mDelay);
|
||||
gThread->AddTimer(this);
|
||||
}
|
||||
|
||||
PRThread *thread;
|
||||
mCallingThread->GetPRThread(&thread);
|
||||
|
||||
nsCOMPtr<nsIEventQueue> queue;
|
||||
gThread->mEventQueueService->GetThreadEventQueue(thread, getter_AddRefs(queue));
|
||||
|
||||
queue->PostEvent(&event->e);
|
||||
}
|
||||
|
||||
void nsTimerImpl::SetDelayInternal(PRUint32 aDelay)
|
||||
{
|
||||
mDelay = aDelay;
|
||||
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
|
||||
mTimeout = now + PR_MillisecondsToInterval(mDelay);
|
||||
|
||||
#ifdef DEBUG_TIMERS
|
||||
if (mStart == 0)
|
||||
mStart = now;
|
||||
else
|
||||
mStart2 = now;
|
||||
#endif
|
||||
}
|
150
xpcom/threads/nsTimerImpl.h
Normal file
150
xpcom/threads/nsTimerImpl.h
Normal file
@ -0,0 +1,150 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by the Initial Developer are
|
||||
* Copyright (C) 2001 the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*/
|
||||
|
||||
#ifndef nsTimerImpl_h___
|
||||
#define nsTimerImpl_h___
|
||||
|
||||
#define NS_TIMER_CONTRACTID "@mozilla.org/timer;1"
|
||||
|
||||
//#define FORCE_PR_LOG /* Allow logging in the release build */
|
||||
|
||||
#include "nsITimer.h"
|
||||
#include "nsITimerCallback.h"
|
||||
|
||||
#include "nsIThread.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include "prlog.h"
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
// stupid NS_DECL_LOG crap
|
||||
#ifdef PRLogModuleInfo
|
||||
#undef PRLogModuleInfo
|
||||
#endif
|
||||
#ifdef PR_NewLogModule
|
||||
#undef PR_NewLogModule
|
||||
#endif
|
||||
|
||||
static PRLogModuleInfo *gTimerLog = PR_NewLogModule("nsTimerImpl");
|
||||
#define DEBUG_TIMERS
|
||||
#else
|
||||
#undef DEBUG_TIMERS
|
||||
#endif
|
||||
|
||||
#define NS_TIMER_CLASSNAME "Timer"
|
||||
#define NS_TIMER_CID \
|
||||
{ /* 5ff24248-1dd2-11b2-8427-fbab44f29bc8 */ \
|
||||
0x5ff24248, \
|
||||
0x1dd2, \
|
||||
0x11b2, \
|
||||
{0x84, 0x27, 0xfb, 0xab, 0x44, 0xf2, 0x9b, 0xc8} \
|
||||
}
|
||||
|
||||
enum {
|
||||
CALLBACK_TYPE_UNKNOWN = 0,
|
||||
CALLBACK_TYPE_INTERFACE = 1,
|
||||
CALLBACK_TYPE_FUNC = 2
|
||||
};
|
||||
|
||||
class nsTimerImpl : public nsITimer
|
||||
{
|
||||
public:
|
||||
|
||||
nsTimerImpl();
|
||||
virtual ~nsTimerImpl();
|
||||
|
||||
static void Shutdown();
|
||||
|
||||
friend class TimerThread;
|
||||
|
||||
void Fire();
|
||||
void Process();
|
||||
void SetDelayInternal(PRUint32 aDelay);
|
||||
|
||||
NS_IMETHOD Init(nsTimerCallbackFunc aFunc,
|
||||
void *aClosure,
|
||||
PRUint32 aDelay,
|
||||
PRUint32 aPriority,
|
||||
PRUint32 aType);
|
||||
|
||||
NS_IMETHOD Init(nsITimerCallback *aCallback,
|
||||
PRUint32 aDelay,
|
||||
PRUint32 aPriority,
|
||||
PRUint32 aType);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD_(void) Cancel();
|
||||
|
||||
NS_IMETHOD_(PRUint32) GetDelay() { return mDelay; }
|
||||
NS_IMETHOD_(void) SetDelay(PRUint32 aDelay);
|
||||
|
||||
NS_IMETHOD_(PRUint32) GetPriority() { return (PRUint32)mPriority; }
|
||||
NS_IMETHOD_(void) SetPriority(PRUint32 aPriority);
|
||||
|
||||
NS_IMETHOD_(PRUint32) GetType() { return (PRUint32)mType; }
|
||||
NS_IMETHOD_(void) SetType(PRUint32 aType);
|
||||
|
||||
NS_IMETHOD_(void*) GetClosure() { return mClosure; }
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIThread> mCallingThread;
|
||||
|
||||
void * mClosure;
|
||||
|
||||
union {
|
||||
nsTimerCallbackFunc c;
|
||||
nsITimerCallback * i;
|
||||
} mCallback;
|
||||
|
||||
PRUint8 mCallbackType;
|
||||
PRUint8 mPriority;
|
||||
PRUint8 mType;
|
||||
PRUint8 mFiring;
|
||||
|
||||
PRUint32 mDelay;
|
||||
PRIntervalTime mTimeout;
|
||||
|
||||
#ifdef DEBUG_TIMERS
|
||||
PRIntervalTime mStart, mStart2;
|
||||
static double sDeltaSum;
|
||||
static double sDeltaSumSquared;
|
||||
static double sNum;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsTimerImpl_h___ */
|
@ -80,7 +80,6 @@ LCFLAGS = \
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(LIBNSPR) \
|
||||
|
@ -62,7 +62,6 @@ LLIBS = \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(NULL)
|
||||
|
||||
OBJS = \
|
||||
|
@ -29,7 +29,6 @@ REQUIRES = xpcom \
|
||||
necko \
|
||||
necko2 \
|
||||
nkcache \
|
||||
timer \
|
||||
intl \
|
||||
locale \
|
||||
mork \
|
||||
@ -77,7 +76,6 @@ WIN_LIBS = \
|
||||
LLIBS= \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\unicharutil_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user