changes all usages of NS_NewTimer to CreateInstance
This commit is contained in:
Родитель
2b45bf9f5e
Коммит
0c75802384
|
@ -3352,7 +3352,6 @@ AC_SUBST(MOZ_UPDATE_XTERM)
|
|||
AC_SUBST(MOZ_MATHML)
|
||||
AC_SUBST(MOZ_SVG)
|
||||
AC_SUBST(MOZ_MONOLITHIC_TOOLKIT)
|
||||
AC_SUBST(MOZ_TIMER_LIBS)
|
||||
AC_SUBST(MOZ_JS_LIBS)
|
||||
AC_SUBST(MOZ_SECURITY)
|
||||
dnl AC_SUBST(MOZ_NETCAST)
|
||||
|
|
|
@ -416,7 +416,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsAutoScrollTimer()
|
||||
: mSelection(0), mTimer(0), mFrame(0), mPresContext(0), mPoint(0,0), mScrollPoint(0,0), mDelay(30)
|
||||
: mSelection(0), mFrame(0), mPresContext(0), mPoint(0,0), mScrollPoint(0,0), mDelay(30)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -426,7 +426,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +437,8 @@ public:
|
|||
|
||||
if (!mTimer)
|
||||
{
|
||||
nsresult result = NS_NewTimer(&mTimer);
|
||||
nsresult result;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &result);
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
@ -454,7 +454,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
mTimer = 0;
|
||||
}
|
||||
|
||||
|
@ -499,7 +498,7 @@ public:
|
|||
private:
|
||||
nsSelection *mFrameSelection;
|
||||
nsDOMSelection *mSelection;
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsIFrame *mFrame;
|
||||
nsIPresContext *mPresContext;
|
||||
nsPoint mPoint;
|
||||
|
|
|
@ -2377,7 +2377,7 @@ HTMLContentSink::WillInterrupt()
|
|||
mNotificationTimer->Cancel();
|
||||
}
|
||||
|
||||
result = NS_NewTimer(getter_AddRefs(mNotificationTimer));
|
||||
mNotificationTimer = do_CreateInstance("component://netscape/timer", &result);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
SINK_TRACE(SINK_TRACE_REFLOW,
|
||||
("HTMLContentSink::WillInterrupt: setting up timer with delay %d", delay));
|
||||
|
|
|
@ -45,7 +45,6 @@ XUL_ATOM(button, "button")
|
|||
XUL_ATOM(spinner, "spinner")
|
||||
XUL_ATOM(scrollbar, "scrollbar")
|
||||
XUL_ATOM(slider, "slider")
|
||||
XUL_ATOM(colorpicker, "colorpicker")
|
||||
XUL_ATOM(palettename, "palettename")
|
||||
XUL_ATOM(fontpicker, "fontpicker")
|
||||
XUL_ATOM(text, "text")
|
||||
|
|
|
@ -280,7 +280,7 @@ XULPopupListenerImpl::MouseMove(nsIDOMEvent* aMouseEvent)
|
|||
if (mPopupContent || mTooltipTimer)
|
||||
return NS_OK;
|
||||
|
||||
NS_NewTimer ( getter_AddRefs(mTooltipTimer) );
|
||||
mTooltipTimer = do_CreateInstance("component://netscape/timer");
|
||||
if ( mTooltipTimer ) {
|
||||
nsCOMPtr<nsIDOMEventTarget> eventTarget;
|
||||
nsCOMPtr<nsIDOMNode> eventTargetNode;
|
||||
|
|
|
@ -2004,8 +2004,7 @@ NS_IMETHODIMP nsDocShell::RefreshURI(nsIURI *aURI, PRInt32 aDelay, PRBool aRepea
|
|||
refreshTimer->mDelay = aDelay;
|
||||
refreshTimer->mRepeat = aRepeat;
|
||||
|
||||
nsITimer* timer = nsnull;
|
||||
NS_NewTimer(&timer);
|
||||
nsCOMPtr<nsITimer> timer = do_CreateInstance("component://netscape/timer");
|
||||
NS_ENSURE_TRUE(timer, NS_ERROR_FAILURE);
|
||||
|
||||
mRefreshURIList.AppendElement(timer);
|
||||
|
|
|
@ -43,7 +43,6 @@ EXTRA_DSO_LDOPTS= \
|
|||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -3180,7 +3180,8 @@ NS_IMETHODIMP GlobalWindowImpl::SetTimeoutOrInterval(JSContext* cx, jsval* argv,
|
|||
LL_I2L(now, PR_IntervalNow());
|
||||
LL_D2L(delta, PR_MillisecondsToInterval((PRUint32)interval));
|
||||
LL_ADD(timeout->when, now, delta);
|
||||
nsresult err = NS_NewTimer(&timeout->timer);
|
||||
nsresult err;
|
||||
timeout->timer = do_CreateInstance("component://netscape/timer", &err);
|
||||
if(NS_OK != err)
|
||||
{
|
||||
DropTimeout(timeout);
|
||||
|
@ -3369,11 +3370,10 @@ PRBool GlobalWindowImpl::RunTimeout(nsTimeoutImpl *aTimeout)
|
|||
delay32 = 0;
|
||||
delay32 = PR_IntervalToMilliseconds(delay32);
|
||||
|
||||
NS_IF_RELEASE(timeout->timer);
|
||||
|
||||
/* Reschedule timeout. Account for possible error return in
|
||||
code below that checks for zero toid. */
|
||||
nsresult err = NS_NewTimer(&timeout->timer);
|
||||
nsresult err;
|
||||
timeout->timer = do_CreateInstance("component://netscape/timer", &err);
|
||||
if(NS_OK != err) {
|
||||
mTimeoutInsertionPoint = last_insertion_point;
|
||||
NS_RELEASE(temp);
|
||||
|
@ -3472,7 +3472,6 @@ void GlobalWindowImpl::DropTimeout(nsTimeoutImpl *aTimeout,
|
|||
}
|
||||
}
|
||||
}
|
||||
NS_IF_RELEASE(aTimeout->timer);
|
||||
PR_FREEIF(aTimeout->filename);
|
||||
NS_IF_RELEASE(aTimeout->window);
|
||||
NS_IF_RELEASE(aTimeout->principal);
|
||||
|
@ -3512,7 +3511,6 @@ NS_IMETHODIMP GlobalWindowImpl::ClearTimeoutOrInterval(PRInt32 aTimerID)
|
|||
if(timeout->timer)
|
||||
{
|
||||
timeout->timer->Cancel();
|
||||
NS_RELEASE(timeout->timer);
|
||||
DropTimeout(timeout);
|
||||
}
|
||||
DropTimeout(timeout);
|
||||
|
@ -3541,7 +3539,6 @@ void GlobalWindowImpl::ClearAllTimeouts()
|
|||
if(timeout->timer)
|
||||
{
|
||||
timeout->timer->Cancel();
|
||||
NS_RELEASE(timeout->timer);
|
||||
// Drop the count since the timer isn't going to hold on
|
||||
// anymore.
|
||||
DropTimeout(timeout);
|
||||
|
|
|
@ -244,7 +244,7 @@ struct nsTimeoutImpl {
|
|||
GlobalWindowImpl *window; /* window for which this timeout fires */
|
||||
JSString *expr; /* the JS expression to evaluate */
|
||||
JSObject *funobj; /* or function to call, if !expr */
|
||||
nsITimer *timer; /* The actual timer object */
|
||||
nsCOMPtr<nsITimer> timer; /* The actual timer object */
|
||||
jsval *argv; /* function actual arguments */
|
||||
PRUint16 argc; /* and argument count */
|
||||
PRUint16 spare; /* alignment padding */
|
||||
|
|
|
@ -48,7 +48,6 @@ SHARED_LIBRARY_LIBS = \
|
|||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -77,7 +77,6 @@ CPPSRCS = \
|
|||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_NECKO_UTIL_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
-lmozjs \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ nsresult nsInterfaceState::PrimeUpdateTimer()
|
|||
mUpdateTimer = NULL; // free it
|
||||
}
|
||||
|
||||
rv = NS_NewTimer(getter_AddRefs(mUpdateTimer));
|
||||
mUpdateTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
const PRUint32 kUpdateTimerDelay = 150;
|
||||
|
|
|
@ -269,7 +269,7 @@ nsresult nsInterfaceState::PrimeUpdateTimer()
|
|||
mUpdateTimer = NULL; // free it
|
||||
}
|
||||
|
||||
rv = NS_NewTimer(getter_AddRefs(mUpdateTimer));
|
||||
mUpdateTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
const PRUint32 kUpdateTimerDelay = 150;
|
||||
|
|
|
@ -53,7 +53,7 @@ const PRUint32 kThrobFrequency = 66; // animation frequency in milliseconds
|
|||
CThrobber::CThrobber() :
|
||||
mImages(nsnull),
|
||||
mNumImages(0), mCompletedImages(0), mIndex(0), mRunning(false),
|
||||
mImageGroup(nsnull), mTimer(nsnull)
|
||||
mImageGroup(nsnull)
|
||||
{
|
||||
NS_INIT_REFCNT(); // caller must add ref as normal
|
||||
|
||||
|
@ -65,7 +65,7 @@ CThrobber::CThrobber(LStream* inStream) :
|
|||
LView(inStream),
|
||||
mImages(nsnull),
|
||||
mNumImages(0), mCompletedImages(0), mIndex(0), mRunning(false),
|
||||
mImageGroup(nsnull), mTimer(nsnull)
|
||||
mImageGroup(nsnull)
|
||||
{
|
||||
mRefCnt = 1; // PowerPlant is making us, and it sure isn't going to do an AddRef.
|
||||
|
||||
|
@ -279,7 +279,7 @@ NS_METHOD CThrobber::LoadImages(const nsString& aFileNameMask, PRInt32 aNumImage
|
|||
mImageGroup->Init(deviceCtx, nsnull);
|
||||
NS_RELEASE(deviceCtx);
|
||||
|
||||
rv = NS_NewTimer(&mTimer);
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -310,7 +310,6 @@ void CThrobber::DestroyImages()
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
|
||||
if (mImageGroup)
|
||||
|
@ -346,9 +345,8 @@ void CThrobber::Tick()
|
|||
}
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
NS_RELEASE(mTimer);
|
||||
|
||||
nsresult rv = NS_NewTimer(&mTimer);
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_OK == rv) {
|
||||
mTimer->Init(ThrobTimerCallback, this, kThrobFrequency);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ public:
|
|||
bool mRunning;
|
||||
SInt32 mNumImages, mCompletedImages, mIndex;
|
||||
nsIImageGroup *mImageGroup;
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
|
||||
static map<nsIWidget*, CThrobber*> mgThrobberMap;
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ XP_DIST_LIBS = \
|
|||
|
||||
XP_NS_UNDERBAR_CRAP = \
|
||||
$(MOZ_NECKO_UTIL_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@ SHARED_LIBRARY_LIBS = \
|
|||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ CPPSRCS = \
|
|||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MKSHLIB_FORCE_ALL) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(DIST)/lib/libimg_s.a \
|
||||
$(DIST)/lib/libmozutil_s.a \
|
||||
-lraptorgfx \
|
||||
|
@ -63,4 +62,4 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
CFLAGS += $(TK_CFLAGS)
|
||||
INCLUDES += $(TK_CFLAGS) -I$(srcdir)/..
|
||||
INCLUDES += $(TK_CFLAGS) -I$(srcdir)/..
|
||||
|
|
|
@ -135,7 +135,7 @@ protected:
|
|||
PRBool mInterrupted;
|
||||
ImageNetContextImpl *mContext;
|
||||
nsIInputStream *mStream;
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
PRBool mFirstRead;
|
||||
char *mBuffer;
|
||||
PRInt32 mStatus;
|
||||
|
@ -154,7 +154,6 @@ ImageConsumer::ImageConsumer(ilIURL *aURL, ImageNetContextImpl *aContext)
|
|||
mInterrupted = PR_FALSE;
|
||||
mFirstRead = PR_TRUE;
|
||||
mStream = nsnull;
|
||||
mTimer = nsnull;
|
||||
mBuffer = nsnull;
|
||||
mStatus = 0;
|
||||
mChannel = nsnull;
|
||||
|
@ -485,7 +484,6 @@ NS_IMETHODIMP
|
|||
ImageConsumer::OnStopRequest(nsIChannel* channel, nsISupports* aContext, nsresult status, const PRUnichar* aMsg)
|
||||
{
|
||||
if (mTimer != nsnull) {
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
|
||||
if (NS_BINDING_SUCCEEDED != status) {
|
||||
|
@ -507,7 +505,9 @@ ImageConsumer::OnStopRequest(nsIChannel* channel, nsISupports* aContext, nsresul
|
|||
if (mStream) {
|
||||
SetKeepPumpingData(channel, aContext);
|
||||
|
||||
if ((NS_OK != NS_NewTimer(&mTimer)) ||
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_FAILED(rv) ||
|
||||
(NS_OK != mTimer->Init(ImageConsumer::KeepPumpingStream, this, 0))) {
|
||||
mStatus = MK_IMAGE_LOSSAGE;
|
||||
NS_RELEASE(mStream);
|
||||
|
@ -556,7 +556,6 @@ ImageConsumer::~ImageConsumer()
|
|||
NS_IF_RELEASE(mURL);
|
||||
NS_IF_RELEASE(mContext);
|
||||
NS_IF_RELEASE(mStream);
|
||||
NS_IF_RELEASE(mTimer);
|
||||
if (mBuffer != nsnull) {
|
||||
PR_DELETE(mBuffer);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,14 @@ ImageSystemServicesImpl::SetTimeout(ilTimeoutCallbackFunction aFunc,
|
|||
nsITimer *timer;
|
||||
TimerClosure *tc;
|
||||
|
||||
if (NS_NewTimer(&timer) != NS_OK) {
|
||||
nsresult rv;
|
||||
rv = nsComponentManager::CreateInstance("component://netscape/timer",
|
||||
nsnull,
|
||||
NS_GET_IID(nsITimer),
|
||||
(void**)&timer);
|
||||
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ LIBS = \
|
|||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -38,7 +38,6 @@ LIBS = \
|
|||
-lmozjs \
|
||||
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
||||
-lraptorgfx \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -41,7 +41,6 @@ EXPORT_RESOURCE = \
|
|||
LIBS = \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -60,10 +60,6 @@ CPPSRCS = \
|
|||
xpctest_out.cpp \
|
||||
$(NULL)
|
||||
|
||||
LIBS += \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
-lmozjs \
|
||||
|
|
|
@ -415,8 +415,10 @@ xpctestEcho::CallReceiverSometimeLater(void)
|
|||
// as it is built today. This is only test code and we can stand to
|
||||
// have it only work on Win32 for now.
|
||||
#ifdef WIN32
|
||||
nsITimer *timer;
|
||||
if(NS_FAILED(NS_NewTimer(&timer)))
|
||||
nsCOMPtr<nsITimer> timer;
|
||||
nsresult rv;
|
||||
timer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if(NS_FAILED(rv))
|
||||
return NS_ERROR_FAILURE;
|
||||
timer->Init(NS_STATIC_CAST(nsITimerCallback*,this), 2000);
|
||||
return NS_OK;
|
||||
|
|
|
@ -55,7 +55,6 @@ static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
|||
|
||||
nsCaret::nsCaret()
|
||||
: mPresShell(nsnull)
|
||||
, mBlinkTimer(nsnull)
|
||||
, mBlinkRate(500)
|
||||
, mCaretWidth(20)
|
||||
, mVisible(PR_FALSE)
|
||||
|
@ -344,7 +343,6 @@ void nsCaret::KillTimer()
|
|||
if (mBlinkTimer)
|
||||
{
|
||||
mBlinkTimer->Cancel();
|
||||
NS_RELEASE(mBlinkTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,7 +355,8 @@ nsresult nsCaret::PrimeTimer()
|
|||
// set up the blink timer
|
||||
if (!mReadOnly && mBlinkRate > 0)
|
||||
{
|
||||
nsresult err = NS_NewTimer(&mBlinkTimer);
|
||||
nsresult err;
|
||||
mBlinkTimer = do_CreateInstance("component://netscape/timer", &err);
|
||||
|
||||
if (NS_FAILED(err))
|
||||
return err;
|
||||
|
|
|
@ -87,7 +87,7 @@ class nsCaret : public nsICaret,
|
|||
|
||||
nsCOMPtr<nsIWeakReference> mPresShell;
|
||||
|
||||
nsITimer* mBlinkTimer;
|
||||
nsCOMPtr<nsITimer> mBlinkTimer;
|
||||
|
||||
PRUint32 mBlinkRate; // time for one cyle (off then on), in milliseconds
|
||||
nscoord mCaretWidth; // caret width in twips
|
||||
|
|
|
@ -55,7 +55,6 @@ static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
|||
|
||||
nsCaret::nsCaret()
|
||||
: mPresShell(nsnull)
|
||||
, mBlinkTimer(nsnull)
|
||||
, mBlinkRate(500)
|
||||
, mCaretWidth(20)
|
||||
, mVisible(PR_FALSE)
|
||||
|
@ -344,7 +343,6 @@ void nsCaret::KillTimer()
|
|||
if (mBlinkTimer)
|
||||
{
|
||||
mBlinkTimer->Cancel();
|
||||
NS_RELEASE(mBlinkTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,7 +355,8 @@ nsresult nsCaret::PrimeTimer()
|
|||
// set up the blink timer
|
||||
if (!mReadOnly && mBlinkRate > 0)
|
||||
{
|
||||
nsresult err = NS_NewTimer(&mBlinkTimer);
|
||||
nsresult err;
|
||||
mBlinkTimer = do_CreateInstance("component://netscape/timer", &err);
|
||||
|
||||
if (NS_FAILED(err))
|
||||
return err;
|
||||
|
|
|
@ -87,7 +87,7 @@ class nsCaret : public nsICaret,
|
|||
|
||||
nsCOMPtr<nsIWeakReference> mPresShell;
|
||||
|
||||
nsITimer* mBlinkTimer;
|
||||
nsCOMPtr<nsITimer> mBlinkTimer;
|
||||
|
||||
PRUint32 mBlinkRate; // time for one cyle (off then on), in milliseconds
|
||||
nscoord mCaretWidth; // caret width in twips
|
||||
|
|
|
@ -416,7 +416,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsAutoScrollTimer()
|
||||
: mSelection(0), mTimer(0), mFrame(0), mPresContext(0), mPoint(0,0), mScrollPoint(0,0), mDelay(30)
|
||||
: mSelection(0), mFrame(0), mPresContext(0), mPoint(0,0), mScrollPoint(0,0), mDelay(30)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -426,7 +426,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +437,8 @@ public:
|
|||
|
||||
if (!mTimer)
|
||||
{
|
||||
nsresult result = NS_NewTimer(&mTimer);
|
||||
nsresult result;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &result);
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
@ -454,7 +454,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
mTimer = 0;
|
||||
}
|
||||
|
||||
|
@ -499,7 +498,7 @@ public:
|
|||
private:
|
||||
nsSelection *mFrameSelection;
|
||||
nsDOMSelection *mSelection;
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsIFrame *mFrame;
|
||||
nsIPresContext *mPresContext;
|
||||
nsPoint mPoint;
|
||||
|
|
|
@ -36,7 +36,6 @@ LIBS += \
|
|||
$(DIST)/lib/libraptorlayout_s.a \
|
||||
-lraptorgfx \
|
||||
-lmozjs \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
|
|
|
@ -91,7 +91,6 @@ SHARED_LIBRARY_LIBS += \
|
|||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
-L$(DIST)/bin \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
|
|
|
@ -607,6 +607,9 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
|
|||
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
|
||||
}
|
||||
|
||||
nsRect damageRect;
|
||||
damageRect.IntersectRect(inner, aDirtyRect);
|
||||
|
||||
if (lowImage != nsnull && lowSrcLinesLoaded > 0) {
|
||||
//inner.height = lowSrcLinesLoaded;
|
||||
aRenderingContext.DrawImage(lowImage, inner);
|
||||
|
|
|
@ -171,7 +171,7 @@ private:
|
|||
char *mDocumentBase;
|
||||
nsIWidget *mWidget;
|
||||
nsIPresContext *mContext;
|
||||
nsITimer *mPluginTimer;
|
||||
nsCOMPtr<nsITimer> mPluginTimer;
|
||||
nsIPluginHost *mPluginHost;
|
||||
};
|
||||
|
||||
|
@ -1314,7 +1314,6 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
|
|||
mParamNames = nsnull;
|
||||
mParamVals = nsnull;
|
||||
mDocumentBase = nsnull;
|
||||
mPluginTimer = nsnull;
|
||||
mPluginHost = nsnull;
|
||||
}
|
||||
|
||||
|
@ -1325,7 +1324,6 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
|||
// shut off the timer.
|
||||
if (mPluginTimer != nsnull) {
|
||||
mPluginTimer->Cancel();
|
||||
NS_RELEASE(mPluginTimer);
|
||||
}
|
||||
|
||||
if (nsnull != mInstance)
|
||||
|
@ -2256,8 +2254,9 @@ NS_IMETHODIMP_(void) nsPluginInstanceOwner::Notify(nsITimer* /* timer */)
|
|||
#ifndef REPEATING_TIMERS
|
||||
// reprime the timer? currently have to create a new timer for each call, which is
|
||||
// kind of wasteful. need to get periodic timers working on all platforms.
|
||||
NS_IF_RELEASE(mPluginTimer);
|
||||
if (NS_NewTimer(&mPluginTimer) == NS_OK)
|
||||
nsresult rv;
|
||||
mPluginTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mPluginTimer->Init(this, 1000 / 60);
|
||||
#endif
|
||||
}
|
||||
|
@ -2266,7 +2265,6 @@ void nsPluginInstanceOwner::CancelTimer()
|
|||
{
|
||||
if (mPluginTimer != NULL) {
|
||||
mPluginTimer->Cancel();
|
||||
NS_RELEASE(mPluginTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2348,7 +2346,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void)
|
|||
|
||||
#if defined(XP_MAC)
|
||||
// start a periodic timer to provide null events to the plugin instance.
|
||||
rv = NS_NewTimer(&mPluginTimer);
|
||||
mPluginTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (rv == NS_OK)
|
||||
rv = mPluginTimer->Init(this, 1000 / 60, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
|
||||
#endif
|
||||
|
|
|
@ -416,7 +416,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsAutoScrollTimer()
|
||||
: mSelection(0), mTimer(0), mFrame(0), mPresContext(0), mPoint(0,0), mScrollPoint(0,0), mDelay(30)
|
||||
: mSelection(0), mFrame(0), mPresContext(0), mPoint(0,0), mScrollPoint(0,0), mDelay(30)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -426,7 +426,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +437,8 @@ public:
|
|||
|
||||
if (!mTimer)
|
||||
{
|
||||
nsresult result = NS_NewTimer(&mTimer);
|
||||
nsresult result;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &result);
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
@ -454,7 +454,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
mTimer = 0;
|
||||
}
|
||||
|
||||
|
@ -499,7 +498,7 @@ public:
|
|||
private:
|
||||
nsSelection *mFrameSelection;
|
||||
nsDOMSelection *mSelection;
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsIFrame *mFrame;
|
||||
nsIPresContext *mPresContext;
|
||||
nsPoint mPoint;
|
||||
|
|
|
@ -185,7 +185,7 @@ protected:
|
|||
: mPresContext(aPresContext), mFrame(aFrame) {}
|
||||
};
|
||||
|
||||
nsITimer* mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsVoidArray mFrames;
|
||||
nsIPresContext* mPresContext;
|
||||
|
||||
|
@ -206,7 +206,6 @@ static PRTime gLastTick;
|
|||
nsBlinkTimer::nsBlinkTimer()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mTimer = nsnull;
|
||||
}
|
||||
|
||||
nsBlinkTimer::~nsBlinkTimer()
|
||||
|
@ -217,7 +216,8 @@ nsBlinkTimer::~nsBlinkTimer()
|
|||
|
||||
void nsBlinkTimer::Start()
|
||||
{
|
||||
nsresult rv = NS_NewTimer(&mTimer);
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_OK == rv) {
|
||||
mTimer->Init(this, 750, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_PRECISE);
|
||||
}
|
||||
|
@ -227,7 +227,6 @@ void nsBlinkTimer::Stop()
|
|||
{
|
||||
if (nsnull != mTimer) {
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -607,6 +607,9 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
|
|||
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
|
||||
}
|
||||
|
||||
nsRect damageRect;
|
||||
damageRect.IntersectRect(inner, aDirtyRect);
|
||||
|
||||
if (lowImage != nsnull && lowSrcLinesLoaded > 0) {
|
||||
//inner.height = lowSrcLinesLoaded;
|
||||
aRenderingContext.DrawImage(lowImage, inner);
|
||||
|
|
|
@ -171,7 +171,7 @@ private:
|
|||
char *mDocumentBase;
|
||||
nsIWidget *mWidget;
|
||||
nsIPresContext *mContext;
|
||||
nsITimer *mPluginTimer;
|
||||
nsCOMPtr<nsITimer> mPluginTimer;
|
||||
nsIPluginHost *mPluginHost;
|
||||
};
|
||||
|
||||
|
@ -1314,7 +1314,6 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
|
|||
mParamNames = nsnull;
|
||||
mParamVals = nsnull;
|
||||
mDocumentBase = nsnull;
|
||||
mPluginTimer = nsnull;
|
||||
mPluginHost = nsnull;
|
||||
}
|
||||
|
||||
|
@ -1325,7 +1324,6 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
|||
// shut off the timer.
|
||||
if (mPluginTimer != nsnull) {
|
||||
mPluginTimer->Cancel();
|
||||
NS_RELEASE(mPluginTimer);
|
||||
}
|
||||
|
||||
if (nsnull != mInstance)
|
||||
|
@ -2256,8 +2254,9 @@ NS_IMETHODIMP_(void) nsPluginInstanceOwner::Notify(nsITimer* /* timer */)
|
|||
#ifndef REPEATING_TIMERS
|
||||
// reprime the timer? currently have to create a new timer for each call, which is
|
||||
// kind of wasteful. need to get periodic timers working on all platforms.
|
||||
NS_IF_RELEASE(mPluginTimer);
|
||||
if (NS_NewTimer(&mPluginTimer) == NS_OK)
|
||||
nsresult rv;
|
||||
mPluginTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mPluginTimer->Init(this, 1000 / 60);
|
||||
#endif
|
||||
}
|
||||
|
@ -2266,7 +2265,6 @@ void nsPluginInstanceOwner::CancelTimer()
|
|||
{
|
||||
if (mPluginTimer != NULL) {
|
||||
mPluginTimer->Cancel();
|
||||
NS_RELEASE(mPluginTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2348,7 +2346,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void)
|
|||
|
||||
#if defined(XP_MAC)
|
||||
// start a periodic timer to provide null events to the plugin instance.
|
||||
rv = NS_NewTimer(&mPluginTimer);
|
||||
mPluginTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (rv == NS_OK)
|
||||
rv = mPluginTimer->Init(this, 1000 / 60, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
|
||||
#endif
|
||||
|
|
|
@ -185,7 +185,7 @@ protected:
|
|||
: mPresContext(aPresContext), mFrame(aFrame) {}
|
||||
};
|
||||
|
||||
nsITimer* mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsVoidArray mFrames;
|
||||
nsIPresContext* mPresContext;
|
||||
|
||||
|
@ -206,7 +206,6 @@ static PRTime gLastTick;
|
|||
nsBlinkTimer::nsBlinkTimer()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mTimer = nsnull;
|
||||
}
|
||||
|
||||
nsBlinkTimer::~nsBlinkTimer()
|
||||
|
@ -217,7 +216,8 @@ nsBlinkTimer::~nsBlinkTimer()
|
|||
|
||||
void nsBlinkTimer::Start()
|
||||
{
|
||||
nsresult rv = NS_NewTimer(&mTimer);
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_OK == rv) {
|
||||
mTimer->Init(this, 750, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_PRECISE);
|
||||
}
|
||||
|
@ -227,7 +227,6 @@ void nsBlinkTimer::Stop()
|
|||
{
|
||||
if (nsnull != mTimer) {
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2377,7 +2377,7 @@ HTMLContentSink::WillInterrupt()
|
|||
mNotificationTimer->Cancel();
|
||||
}
|
||||
|
||||
result = NS_NewTimer(getter_AddRefs(mNotificationTimer));
|
||||
mNotificationTimer = do_CreateInstance("component://netscape/timer", &result);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
SINK_TRACE(SINK_TRACE_REFLOW,
|
||||
("HTMLContentSink::WillInterrupt: setting up timer with delay %d", delay));
|
||||
|
|
|
@ -3892,7 +3892,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsSelectAutoScrollTimer()
|
||||
: mTimer(0), mFrame(0), mPresContext(0), mPoint(0,0), mDelay(30)
|
||||
: mFrame(0), mPresContext(0), mPoint(0,0), mDelay(30)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -3902,7 +3902,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3914,7 +3913,8 @@ public:
|
|||
|
||||
if (!mTimer)
|
||||
{
|
||||
nsresult result = NS_NewTimer(&mTimer);
|
||||
nsresult result;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &result);
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
@ -3930,7 +3930,6 @@ public:
|
|||
if (mTimer)
|
||||
{
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
mTimer = 0;
|
||||
}
|
||||
|
||||
|
@ -3959,7 +3958,7 @@ public:
|
|||
|
||||
private:
|
||||
nsGfxListControlFrame *mListControl;
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsIFrame *mFrame;
|
||||
nsIPresContext *mPresContext;
|
||||
nsPoint mPoint;
|
||||
|
|
|
@ -57,7 +57,6 @@ LIBS = \
|
|||
$(DIST)/lib/libraptorxmldoc_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libraptorxulbase_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libraptorxulcontent_s.$(LIB_SUFFIX) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
|
|
|
@ -372,7 +372,7 @@ nsMenuFrame::HandleEvent(nsIPresContext* aPresContext,
|
|||
}
|
||||
|
||||
// We're a menu, we're built, we're closed, and no timer has been kicked off.
|
||||
NS_NewTimer(getter_AddRefs(mOpenTimer));
|
||||
mOpenTimer = do_CreateInstance("component://netscape/timer");
|
||||
mOpenTimer->Init(this, menuDelay, NS_PRIORITY_HIGHEST);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -892,7 +892,7 @@ NS_IMETHODIMP nsMenuPopupFrame::SetCurrentMenuItem(nsIMenuFrame* aMenuItem)
|
|||
}
|
||||
|
||||
// Kick off the timer.
|
||||
NS_NewTimer(getter_AddRefs(mCloseTimer));
|
||||
mCloseTimer = do_CreateInstance("component://netscape/timer");
|
||||
mCloseTimer->Init(this, menuDelay, NS_PRIORITY_HIGHEST);
|
||||
mTimerMenu = mCurrentMenu;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,8 @@ void nsRepeatService::Start(nsITimerCallback* aCallback)
|
|||
return;
|
||||
|
||||
mCallback = aCallback;
|
||||
nsresult rv = NS_NewTimer(getter_AddRefs(mRepeatTimer));
|
||||
nsresult rv;
|
||||
mRepeatTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
|
||||
if (NS_OK == rv) {
|
||||
mRepeatTimer->Init(this, INITAL_REPEAT_DELAY);
|
||||
|
@ -88,7 +89,7 @@ NS_IMETHODIMP_(void) nsRepeatService::Notify(nsITimer *timer)
|
|||
|
||||
// start timer again.
|
||||
if (mRepeatTimer) {
|
||||
NS_NewTimer(getter_AddRefs(mRepeatTimer));
|
||||
mRepeatTimer = do_CreateInstance("component://netscape/timer");
|
||||
mRepeatTimer->Init(this, REPEAT_DELAY);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ XUL_ATOM(button, "button")
|
|||
XUL_ATOM(spinner, "spinner")
|
||||
XUL_ATOM(scrollbar, "scrollbar")
|
||||
XUL_ATOM(slider, "slider")
|
||||
XUL_ATOM(colorpicker, "colorpicker")
|
||||
XUL_ATOM(palettename, "palettename")
|
||||
XUL_ATOM(fontpicker, "fontpicker")
|
||||
XUL_ATOM(text, "text")
|
||||
|
|
|
@ -47,7 +47,6 @@ SHARED_LIBRARY_LIBS = \
|
|||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/lib \
|
||||
$(DIST)/lib/librdfutil_s.$(LIB_SUFFIX) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
-L$(DIST)/bin \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
|
|
|
@ -414,13 +414,13 @@ nsresult nsMsgSearchSession::AddUrl(const char *url)
|
|||
|
||||
nsresult nsMsgSearchSession::SearchWOUrls ()
|
||||
{
|
||||
nsresult err = NS_OK;
|
||||
PRBool done;
|
||||
nsresult err = NS_OK;
|
||||
PRBool done;
|
||||
|
||||
NS_NewTimer(getter_AddRefs(m_backgroundTimer));
|
||||
m_backgroundTimer->Init(TimerCallback, (void *) this, 0, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
|
||||
// ### start meteors?
|
||||
err = TimeSlice(&done);
|
||||
m_backgroundTimer = do_CreateInstance("component://netscape/timer", &err);
|
||||
m_backgroundTimer->Init(TimerCallback, (void *) this, 0, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
|
||||
// ### start meteors?
|
||||
err = TimeSlice(&done);
|
||||
#if 0
|
||||
if (!m_urlStruct)
|
||||
m_urlStruct = NET_CreateURLStruct ("search-libmsg:", NET_DONT_RELOAD);
|
||||
|
|
|
@ -41,7 +41,6 @@ nsMsgBiffManager::nsMsgBiffManager()
|
|||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
mBiffTimer = nsnull;
|
||||
mBiffArray = nsnull;
|
||||
mHaveShutdown = PR_FALSE;
|
||||
}
|
||||
|
@ -53,7 +52,6 @@ nsMsgBiffManager::~nsMsgBiffManager()
|
|||
if (mBiffTimer) {
|
||||
mBiffTimer->Cancel();
|
||||
}
|
||||
NS_IF_RELEASE(mBiffTimer);
|
||||
|
||||
PRInt32 count = mBiffArray->Count();
|
||||
PRInt32 i;
|
||||
|
@ -284,9 +282,8 @@ nsresult nsMsgBiffManager::SetupNextBiff()
|
|||
if(mBiffTimer)
|
||||
{
|
||||
mBiffTimer->Cancel();
|
||||
NS_RELEASE(mBiffTimer);
|
||||
}
|
||||
NS_NewTimer(&mBiffTimer);
|
||||
mBiffTimer = do_CreateInstance("component://netscape/timer");
|
||||
mBiffTimer->Init(OnBiffTimer, (void*)this, timeInMSUint32);
|
||||
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
nsresult AddBiffEntry(nsBiffEntry *biffEntry);
|
||||
|
||||
protected:
|
||||
nsITimer *mBiffTimer;
|
||||
nsCOMPtr<nsITimer> mBiffTimer;
|
||||
nsVoidArray *mBiffArray;
|
||||
PRBool mHaveShutdown;
|
||||
};
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
#
|
||||
# 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 Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
PROGRAM = identity
|
||||
CPPSRCS = identity.cpp
|
||||
|
||||
LIBS = \
|
||||
-L$(DIST)/bin \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
|
||||
|
|
@ -39,7 +39,6 @@ endif
|
|||
LIBS = \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -37,7 +37,6 @@ EXTRA_DSO_LIBS = raptorgfx msgbaseutil
|
|||
endif
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
|
|
|
@ -34,7 +34,6 @@ CPPSRCS = \
|
|||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
|
|
|
@ -37,7 +37,6 @@ EXTRA_DSO_LIBS = raptorgfx msgbaseutil
|
|||
endif
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
|
|
|
@ -37,7 +37,6 @@ EXTRA_DSO_LIBS = msgbaseutil
|
|||
endif
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
#
|
||||
# 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 Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
PROGRAM = smtpTest
|
||||
|
||||
CPPSRCS = smtpTest.cpp
|
||||
|
||||
LIBS = \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
@ -43,7 +43,6 @@ LIBS = \
|
|||
-L$(DIST)/bin \
|
||||
$(XPCOM_LIBS) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -38,7 +38,6 @@ endif
|
|||
LIBS = \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -33,7 +33,6 @@ LIBS = \
|
|||
-L$(DIST)/bin \
|
||||
-lmozjs \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -47,7 +47,6 @@ EXTRA_DSO_LDOPTS = \
|
|||
-L$(DIST)/bin \
|
||||
-L$(DIST)/lib \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -2930,8 +2930,8 @@ PRInt32 nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, PRUint32 leng
|
|||
if (mUpdateTimer) {
|
||||
mUpdateTimer->Cancel();
|
||||
mUpdateTimer = nsnull;
|
||||
}
|
||||
rv = NS_NewTimer(getter_AddRefs(mUpdateTimer));
|
||||
}
|
||||
mUpdateTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"failed to create timer");
|
||||
if (NS_FAILED(rv)) return -1;
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ PROGRAM = newsParserTest
|
|||
CPPSRCS = newsParserTest.cpp
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(DIST)/lib/libmsgnews_s.a \
|
||||
-lmozjs \
|
||||
-lraptorgfx \
|
||||
|
|
|
@ -35,7 +35,6 @@ LIBS = \
|
|||
-lxpcom \
|
||||
-lmozjs \
|
||||
-lmsgbaseutil \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -608,9 +608,8 @@ void TimerCallback(nsITimer* aTimer, void* aClosure)
|
|||
}
|
||||
flag = !flag;
|
||||
|
||||
NS_RELEASE(gPeriodicTimer);
|
||||
|
||||
if (NS_OK == NS_NewTimer(&gPeriodicTimer)) {
|
||||
gPeriodicTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
gPeriodicTimer->Init(TimerCallback, nsnull, 1000*5);
|
||||
}
|
||||
}
|
||||
|
@ -702,7 +701,9 @@ main(int argc, char* argv[])
|
|||
//
|
||||
// Start up the timer to test Suspend/Resume APIs on the transport...
|
||||
//
|
||||
if (NS_OK == NS_NewTimer(&gPeriodicTimer)) {
|
||||
nsresult rv;
|
||||
gPeriodicTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
gPeriodicTimer->Init(TimerCallback, nsnull, 1000);
|
||||
}
|
||||
#endif /* USE_TIMERS */
|
||||
|
|
|
@ -623,7 +623,7 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs,
|
|||
}
|
||||
|
||||
/* hack so we don't do this for tinderbox. otherwise the tree goes orange */
|
||||
#if !defined(DEBUG_cltbld) && !defined(MOZ_BYPASS_PROFILE_AT_STARTUP)
|
||||
#if !defined(DEBUG_cltbld) && !defined(MOZ_BYPASS_PROFILE_AT_STARTUP) && !defined(DEBUG_pavlov)
|
||||
#ifdef DEBUG
|
||||
if (profileURLStr.Length() == 0) {
|
||||
printf("DEBUG BUILDS ONLY: we are forcing you to use the profile manager to help smoke test it.\n");
|
||||
|
|
|
@ -50,7 +50,6 @@ SHARED_LIBRARY_LIBS = \
|
|||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
-L$(DIST)/bin \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
|
|
|
@ -42,9 +42,5 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(OS_ARCH),os2)
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_TIMER_LIBS)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ XULPopupListenerImpl::MouseMove(nsIDOMEvent* aMouseEvent)
|
|||
if (mPopupContent || mTooltipTimer)
|
||||
return NS_OK;
|
||||
|
||||
NS_NewTimer ( getter_AddRefs(mTooltipTimer) );
|
||||
mTooltipTimer = do_CreateInstance("component://netscape/timer");
|
||||
if ( mTooltipTimer ) {
|
||||
nsCOMPtr<nsIDOMEventTarget> eventTarget;
|
||||
nsCOMPtr<nsIDOMNode> eventTargetNode;
|
||||
|
|
|
@ -30,7 +30,6 @@ PROGRAM = rdfcat$(BIN_SUFFIX)
|
|||
CPPSRCS = rdfcat.cpp
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
|
|
|
@ -30,7 +30,6 @@ PROGRAM = rdfpoll$(BIN_SUFFIX)
|
|||
CPPSRCS = rdfpoll.cpp
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
|
|
|
@ -51,7 +51,6 @@ REQUIRES = raptor xpcom
|
|||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -372,7 +372,6 @@ nsScrollingView::nsScrollingView()
|
|||
mHScrollBarView = nsnull;
|
||||
mCornerView = nsnull;
|
||||
mScrollPref = nsScrollPreference_kAuto;
|
||||
mScrollingTimer = nsnull;
|
||||
mLineHeight = 240;
|
||||
mListeners = nsnull;
|
||||
}
|
||||
|
@ -394,10 +393,9 @@ nsScrollingView::~nsScrollingView()
|
|||
mClipView = nsnull;
|
||||
mCornerView = nsnull;
|
||||
|
||||
if (nsnull != mScrollingTimer)
|
||||
if (mScrollingTimer)
|
||||
{
|
||||
mScrollingTimer->Cancel();
|
||||
NS_RELEASE(mScrollingTimer);
|
||||
}
|
||||
|
||||
if (nsnull != mListeners) {
|
||||
|
@ -791,9 +789,9 @@ NS_IMETHODIMP_(void) nsScrollingView::Notify(nsITimer * aTimer)
|
|||
NS_RELEASE(obs);
|
||||
}
|
||||
|
||||
NS_RELEASE(mScrollingTimer);
|
||||
|
||||
if (NS_OK == NS_NewTimer(&mScrollingTimer))
|
||||
nsresult rv;
|
||||
mScrollingTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mScrollingTimer->Init(this, 25);
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ protected:
|
|||
nsIView *mCornerView;
|
||||
nsScrollPreference mScrollPref;
|
||||
nsMargin mInsets;
|
||||
nsITimer *mScrollingTimer;
|
||||
nsCOMPtr<nsITimer> mScrollingTimer;
|
||||
nscoord mScrollingDelta;
|
||||
PRUint32 mScrollProperties;
|
||||
nscoord mLineHeight;
|
||||
|
|
|
@ -135,7 +135,6 @@ nsViewManager :: ~nsViewManager()
|
|||
if (nsnull != mTimer)
|
||||
{
|
||||
mTimer->Cancel(); //XXX this should not be necessary. MMP
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -276,9 +275,6 @@ NS_IMETHODIMP nsViewManager :: Init(nsIDeviceContext* aContext, nscoord aX, nsco
|
|||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
}
|
||||
mContext = aContext;
|
||||
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
|
||||
mTimer = nsnull;
|
||||
#endif
|
||||
mFrameRate = 0;
|
||||
mTrueFrameRate = 0;
|
||||
mTransCnt = 0;
|
||||
|
@ -366,7 +362,6 @@ NS_IMETHODIMP nsViewManager :: SetFrameRate(PRUint32 aFrameRate)
|
|||
if (nsnull != mTimer)
|
||||
{
|
||||
mTimer->Cancel(); //XXX this should not be necessary. MMP
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -376,7 +371,7 @@ NS_IMETHODIMP nsViewManager :: SetFrameRate(PRUint32 aFrameRate)
|
|||
if (mFrameRate != 0)
|
||||
{
|
||||
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
|
||||
rv = NS_NewTimer(&mTimer);
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
|
||||
if (NS_OK == rv)
|
||||
mTimer->Init(vm_timer_callback, this, 1000 / mFrameRate);
|
||||
|
|
|
@ -274,7 +274,7 @@ private:
|
|||
public:
|
||||
//these are public so that our timer callback can poke them.
|
||||
#if NS_VIEWMANAGER_NEEDS_TIMER
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
#endif
|
||||
nsRect mDirtyRect;
|
||||
nsIView *mRootView;
|
||||
|
|
|
@ -154,7 +154,6 @@ nsViewManager2::~nsViewManager2()
|
|||
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
|
||||
if (nsnull != mTimer) {
|
||||
mTimer->Cancel(); //XXX this should not be necessary. MMP
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -300,9 +299,6 @@ NS_IMETHODIMP nsViewManager2::Init(nsIDeviceContext* aContext, nscoord aX, nscoo
|
|||
mContext->GetAppUnitsToDevUnits(mTwipsToPixels);
|
||||
mContext->GetDevUnitsToAppUnits(mPixelsToTwips);
|
||||
|
||||
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
|
||||
mTimer = nsnull;
|
||||
#endif
|
||||
mFrameRate = 0;
|
||||
mTrueFrameRate = 0;
|
||||
mTransCnt = 0;
|
||||
|
@ -389,7 +385,6 @@ NS_IMETHODIMP nsViewManager2::SetFrameRate(PRUint32 aFrameRate)
|
|||
if (nsnull != mTimer)
|
||||
{
|
||||
mTimer->Cancel(); //XXX this should not be necessary. MMP
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -399,10 +394,10 @@ NS_IMETHODIMP nsViewManager2::SetFrameRate(PRUint32 aFrameRate)
|
|||
if (mFrameRate != 0)
|
||||
{
|
||||
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
|
||||
rv = NS_NewTimer(&mTimer);
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
|
||||
if (NS_OK == rv)
|
||||
mTimer->Init(vm_timer_callback, this, 1000 / mFrameRate);
|
||||
if (NS_OK == rv)
|
||||
mTimer->Init(vm_timer_callback, this, 1000 / mFrameRate);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ private:
|
|||
public:
|
||||
//these are public so that our timer callback can poke them.
|
||||
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
|
||||
nsITimer *mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
#endif
|
||||
nsRect mDirtyRect;
|
||||
nsIView *mRootView;
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#
|
||||
# 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 Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
MOZ_TIMER_LIBS=@MOZ_TIMER_LIBS@
|
||||
|
|
@ -35,7 +35,6 @@ CPPSRCS = \
|
|||
|
||||
LIBS = \
|
||||
-lraptorgfx \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NETLIB_LIBS) \
|
||||
-lmozjs \
|
||||
$(XPCOM_LIBS) \
|
||||
|
|
|
@ -37,7 +37,6 @@ CPPSRCS = \
|
|||
|
||||
LIBS = \
|
||||
-lraptorgfx \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NETLIB_LIBS) \
|
||||
-lmozjs \
|
||||
$(XPCOM_LIBS) \
|
||||
|
|
|
@ -44,7 +44,6 @@ CPPSRCS = \
|
|||
|
||||
LIBS = \
|
||||
-lraptorgfx \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NETLIB_LIBS) \
|
||||
-lmozjs \
|
||||
$(XPCOM_LIBS) \
|
||||
|
|
|
@ -36,7 +36,6 @@ CPPSRCS = \
|
|||
|
||||
LIBS = \
|
||||
-lraptorgfx \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NETLIB_LIBS) \
|
||||
-lmozjs \
|
||||
$(XPCOM_LIBS) \
|
||||
|
|
|
@ -42,7 +42,6 @@ CPPSRCS = \
|
|||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
-L$(DIST)/bin \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
|
|
|
@ -108,7 +108,6 @@ XP_DIST_LIBS = \
|
|||
$(NULL)
|
||||
|
||||
XP_NS_UNDERBAR_CRAP = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ NS_SetupRegistry()
|
|||
NS_FILESPECWITHUI_PROGID, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFilePickerCID, "FilePicker", "component://mozilla/filepicker", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#ifdef XP_PC
|
||||
nsComponentManager::RegisterComponentLib(kCTimerCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCTimerCID, "Timer", "component://netscape/timer", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCTimerManagerCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -313,9 +313,9 @@ nsThrobber::Tick()
|
|||
}
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
NS_RELEASE(mTimer);
|
||||
|
||||
nsresult rv = NS_NewTimer(&mTimer);
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_OK == rv) {
|
||||
mTimer->Init(ThrobTimerCallback, this, 33);
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ nsThrobber::LoadThrobberImages(const nsString& aFileNameMask, PRInt32 aNumImages
|
|||
mImageGroup->Init(deviceCtx, nsnull);
|
||||
NS_RELEASE(deviceCtx);
|
||||
|
||||
rv = NS_NewTimer(&mTimer);
|
||||
mTimer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -373,7 +373,6 @@ nsThrobber::DestroyThrobberImages()
|
|||
{
|
||||
if (mTimer) {
|
||||
mTimer->Cancel();
|
||||
NS_RELEASE(mTimer);
|
||||
}
|
||||
|
||||
if (mImageGroup) {
|
||||
|
|
|
@ -27,9 +27,10 @@
|
|||
#include "nsIWidget.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsITimer.h"
|
||||
|
||||
class nsIImageGroup;
|
||||
class nsITimer;
|
||||
struct nsRect;
|
||||
|
||||
class nsThrobber : public nsIImageRequestObserver {
|
||||
|
@ -78,7 +79,7 @@ protected:
|
|||
PRInt32 mNumImages;
|
||||
PRInt32 mIndex;
|
||||
nsIImageGroup* mImageGroup;
|
||||
nsITimer* mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
PRBool mRunning;
|
||||
PRUint32 mCompletedImages;
|
||||
|
||||
|
|
|
@ -175,7 +175,6 @@ nsWebCrawler::nsWebCrawler(nsViewerApp* aViewer)
|
|||
|
||||
mBrowser = nsnull;
|
||||
mViewer = aViewer;
|
||||
mTimer = nsnull;
|
||||
mCrawl = PR_FALSE;
|
||||
mJiggleLayout = PR_FALSE;
|
||||
mPostExit = PR_FALSE;
|
||||
|
@ -210,7 +209,6 @@ nsWebCrawler::~nsWebCrawler()
|
|||
FreeStrings(mSafeDomains);
|
||||
FreeStrings(mAvoidDomains);
|
||||
NS_IF_RELEASE(mBrowser);
|
||||
NS_IF_RELEASE(mTimer);
|
||||
delete mVisited;
|
||||
}
|
||||
|
||||
|
@ -809,8 +807,7 @@ void
|
|||
nsWebCrawler::LoadNextURL(PRBool aQueueLoad)
|
||||
{
|
||||
if (0 != mDelay) {
|
||||
NS_IF_RELEASE(mTimer);
|
||||
NS_NewTimer(&mTimer);
|
||||
mTimer = do_CreateInstance("component://netscape/timer");
|
||||
mTimer->Init(TimerCallBack, (void *)this, mDelay * 1000);
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ protected:
|
|||
nsCOMPtr<nsIDocumentLoader> mDocLoader;
|
||||
nsBrowserWindow* mBrowser;
|
||||
nsViewerApp* mViewer;
|
||||
nsITimer* mTimer;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
FILE* mRecord;
|
||||
nsCOMPtr<nsIAtom> mLinkTag;
|
||||
nsCOMPtr<nsIAtom> mFrameTag;
|
||||
|
|
|
@ -64,7 +64,6 @@ SHARED_LIBRARY_LIBS = $(DIST)/lib/libraptorbasewidget_s.a
|
|||
EXTRA_DSO_LDOPTS = \
|
||||
$(TOOLKIT_DSO_LDOPTS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
-lraptorgfx \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -59,7 +59,6 @@ SHARED_LIBRARY_LIBS = $(DIST)/lib/libraptorbasewidget_s.a
|
|||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
-lraptorgfx \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifndef MOZ_MONOLITHIC_TOOLKIT
|
||||
|
|
|
@ -123,7 +123,6 @@ nsresult nsWidget::KillICSpotTimer ()
|
|||
if(mICSpotTimer)
|
||||
{
|
||||
mICSpotTimer->Cancel();
|
||||
NS_RELEASE(mICSpotTimer);
|
||||
mICSpotTimer = nsnull;
|
||||
}
|
||||
return NS_OK;
|
||||
|
@ -131,9 +130,10 @@ nsresult nsWidget::KillICSpotTimer ()
|
|||
nsresult nsWidget::PrimeICSpotTimer ()
|
||||
{
|
||||
KillICSpotTimer();
|
||||
nsresult err = NS_NewTimer(&mICSpotTimer);
|
||||
if(NS_FAILED(err))
|
||||
return err;
|
||||
nsresult err;
|
||||
mICSpotTimer = do_CreateInstance("component://netscape/timer", &err);
|
||||
if (NS_FAILED(err))
|
||||
return err;
|
||||
mICSpotTimer->Init(ICSpotCallback, this, 1000);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -351,7 +351,7 @@ protected:
|
|||
void IMECheckPreedit_PostProc();
|
||||
|
||||
void GetXYFromPosition(unsigned long *aX, unsigned long *aY);
|
||||
nsITimer *mICSpotTimer;
|
||||
nsCOMPtr<nsITimer> mICSpotTimer;
|
||||
static void ICSpotCallback(nsITimer* aTimer, void* aClosure);
|
||||
nsresult KillICSpotTimer();
|
||||
nsresult PrimeICSpotTimer();
|
||||
|
|
|
@ -63,7 +63,6 @@ CPPSRCS = nsAppShell.cpp \
|
|||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(DIST)/lib/libraptorbasewidget_s.a \
|
||||
$(TK_LIBS) \
|
||||
-lraptorgfx \
|
||||
|
|
|
@ -80,7 +80,6 @@ CPPSRCS = \
|
|||
SHARED_LIBRARY_LIBS = $(DIST)/lib/libraptorbasewidget_s.$(LIB_SUFFIX)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ CPPSRCS = \
|
|||
|
||||
LIBS = \
|
||||
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
-lmozjs \
|
||||
-lraptorgfx \
|
||||
|
|
|
@ -34,7 +34,6 @@ CPPSRCS = \
|
|||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
$(MOZ_TIMER_LIBS) \
|
||||
$(MOZ_WIDGET_SUPPORT_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
-lmozjs \
|
||||
|
|
|
@ -139,26 +139,4 @@ public:
|
|||
NS_IMETHOD_(void*) GetClosure()=0;
|
||||
};
|
||||
|
||||
//
|
||||
// Factory method for creating an nsITimer
|
||||
//
|
||||
// Warning: This function should NOT be defined with NS_TIMER because
|
||||
// the intention is that it be linked statically with the library/DLL
|
||||
// or app that uses it.
|
||||
#ifdef XP_UNIX
|
||||
inline nsresult NS_NewTimer(nsITimer **aInstancePtrResult)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsITimer> timer = do_CreateInstance("component://netscape/timer", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aInstancePtrResult = timer;
|
||||
NS_ADDREF(*aInstancePtrResult);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
#else
|
||||
extern nsresult NS_NewTimer(nsITimer** aInstancePtrResult);
|
||||
#endif
|
||||
|
||||
|
||||
#endif // nsITimer_h___
|
||||
|
|
|
@ -24,9 +24,13 @@
|
|||
#include "nsIModule.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include "nsUnixTimerCIID.h"
|
||||
#include "nsTimerGtk.h"
|
||||
|
||||
// {48B62AD2-48D3-11d3-B224-000064657374}
|
||||
#define NS_TIMER_GTK_CID \
|
||||
{ 0x48b62ad2, 0x48d3, 0x11d3, \
|
||||
{ 0xb2, 0x24, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimerGtk)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче