Closed
Bug 712243
Opened 13 years ago
Closed 13 years ago
cleanup nsNotifyAddrListener
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: m_kato, Assigned: m_kato)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
- Don't need version check for Win2000
- fix possible memory leak
- use bool instead of BOOL as possible
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → m_kato
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #583106 -
Flags: review?(jmathies)
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #583106 -
Attachment is obsolete: true
Attachment #583106 -
Flags: review?(jmathies)
Attachment #583107 -
Flags: review?(jmathies)
Comment 3•13 years ago
|
||
Comment on attachment 583107 [details] [diff] [review]
fix v1.1
Review of attachment 583107 [details] [diff] [review]:
-----------------------------------------------------------------
::: netwerk/system/win32/nsNotifyAddrListener.cpp
@@ +449,1 @@
> nsNotifyAddrListener::CheckICSStatus(PWCHAR aAdapterName)
How often is this called? Might be good to move to coinit/couninit calls up so they are only called once for the class.
@@ +458,5 @@
> HRESULT hr;
>
> hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
> if (FAILED(hr))
> + return false;
nits - for added cleanup, why not ditch HRESULT hr, and do
if (FAILED(CoInit())
return false;
and below here, similarly, there are two |if (SUCCEEDED(hr))| calls, but it looks like the whole block could be wrapped up:
if (SUCCEEDED(CoCreateInstance(...
{
connectionVariant.punkVal->Release();
if (SUCCEEDED(connection->GetProperties(..
{
..
}
}
Attachment #583107 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #3)
> Comment on attachment 583107 [details] [diff] [review]
> fix v1.1
>
> Review of attachment 583107 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: netwerk/system/win32/nsNotifyAddrListener.cpp
> @@ +449,1 @@
> > nsNotifyAddrListener::CheckICSStatus(PWCHAR aAdapterName)
>
> How often is this called? Might be good to move to coinit/couninit calls up
> so they are only called once for the class.
This implementation is NS_IMPL_THREADSAFE_ISUPPORTS, so caller isn't on specific thread. We will have to call coinit per call. But since CheckIsGateway is called from loop, we should move it to CheckAdaptersAddresses.
Assignee | ||
Comment 5•13 years ago
|
||
Whiteboard: [inbound]
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•