Open
Bug 585008
Opened 14 years ago
Updated 2 years ago
mark DEBUG only variables as ifdef DEBUG in content
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
NEW
People
(Reporter: timeless, Unassigned)
References
Details
Attachments
(1 file)
2.17 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
this is part of a crusade to get rid of compilation warnings
Comment 2•14 years ago
|
||
Comment on attachment 463524 [details] [diff] [review] using #ifdef DEBUG - In content/base/src/nsWebSocket.cpp: +++ b/content/base/src/nsWebSocket.cpp @@ -1731,10 +1731,12 @@ IMPL_RUNNABLE_ON_MAIN_THREAD_METHOD_BEGI "serialization list."); #endif - PRBool inserted = - !!(sWSsConnecting->InsertElementSorted(this, nsWSNetAddressComparator())); - NS_ASSERTION(inserted, "Couldn't insert the ws connection into the " - "serialization list."); +#ifdef DEBUG + nsRefPtr<nsWebSocketEstablishedConnection>* inserted = +#endif + sWSsConnecting->InsertElementSorted(this, nsWSNetAddressComparator()); + NS_ASSERTION(!!inserted, "Couldn't insert the ws connection into the " + "serialization list."); That should be a raw pointer and not an nsRefPtr to avoid causing differences in behavior here (i.e. more reference counting in debug builds for no good reason AFAICT). r=jst with that.
Attachment #463524 -
Flags: review?(jst) → review+
static nsTArray<nsRefPtr<nsWebSocketEstablishedConnection> >* sWSsConnecting; because of the declaration, the returned object is an nsRefPtr and it will always be addref'd/released.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Comment 4•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: timeless → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•