Closed Bug 84842 Opened 23 years ago Closed 23 years ago

Wrong #ifdef in nsRequestObserverProxy.h (breaks build with FORCE_PR_LOG)

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: c, Assigned: danm.moz)

Details

Attachments

(1 file)

Danm, your checkins to nsRequestObserverProxy.h and nsStreamListenerProxy.cpp
(Jun 5, adding some logging) have broken my tree. You assume that DEBUG is
defined if PR_LOGGING is defined. I build without DEBUG, but with FORCE_PR_LOG.
Attached patch patchSplinter Review
I've felt way slimy ever since I checked in this change; making the class' API 
different depending on whether it's a debug build. I'd prefer to just take out 
the ifdef.

Index: ./netwerk/base/src/nsRequestObserverProxy.h
===================================================================
RCS file: /cvsroot/mozilla/netwerk/base/src/nsRequestObserverProxy.h,v
retrieving revision 1.3
diff -u -r1.3 nsRequestObserverProxy.h
--- nsRequestObserverProxy.h	2001/06/06 02:34:51	1.3
+++ nsRequestObserverProxy.h	2001/06/19 01:17:11
@@ -45,10 +45,7 @@
     nsIRequestObserver *Observer() { return mObserver; }
 
     nsresult FireEvent(nsARequestObserverEvent *);
-#ifdef DEBUG
-    nsIEventQueue *GetEventQueue()
-               { return mEventQ.get(); } // debugging-only; no addref
-#endif
+    nsIEventQueue *EventQueue() { return mEventQ.get(); } // no addref!
     nsresult SetEventQueue(nsIEventQueue *);
 
 protected:
Index: ./netwerk/base/src/nsStreamListenerProxy.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/base/src/nsStreamListenerProxy.cpp,v
retrieving revision 1.13
diff -u -r1.13 nsStreamListenerProxy.cpp
--- nsStreamListenerProxy.cpp	2001/06/06 02:34:52	1.13
+++ nsStreamListenerProxy.cpp	2001/06/19 01:17:15
@@ -326,7 +326,7 @@
     if (!ev) return NS_ERROR_OUT_OF_MEMORY;
 
     // Reuse the event queue of the observer proxy
-    LOG(("post dataevent=%8lX 
queue=%8lX\n",(long)ev,(long)mObserverProxy->GetEventQueue()));
+    LOG(("post dataevent=%8lX 
queue=%8lX\n",(long)ev,(long)mObserverProxy->EventQueue()));
     rv = mObserverProxy->FireEvent(ev);
     if (NS_FAILED(rv))
         delete ev;
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
sr=darin (but i think the "// no addref!" comment is unnecessary, since the
function is not a getter in the xpcom sense).
I don't see how this is holding up 0.9.2.  ->0.9.3
Target Milestone: mozilla0.9.2 → mozilla0.9.3
.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: