Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
79ecb0d7
Commit
79ecb0d7
authored
Jan 12, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Jan 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Use only stored result of Interlocked* in AddRef/Release.
- Expand TRACEs to display the ref count.
parent
11db0ea6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
23 deletions
+21
-23
sec_mgr.c
dlls/urlmon/sec_mgr.c
+14
-15
umon.c
dlls/urlmon/umon.c
+7
-8
No files found.
dlls/urlmon/sec_mgr.c
View file @
79ecb0d7
...
@@ -78,25 +78,25 @@ static HRESULT WINAPI SecManagerImpl_QueryInterface(IInternetSecurityManager* if
...
@@ -78,25 +78,25 @@ static HRESULT WINAPI SecManagerImpl_QueryInterface(IInternetSecurityManager* if
static
ULONG
WINAPI
SecManagerImpl_AddRef
(
IInternetSecurityManager
*
iface
)
static
ULONG
WINAPI
SecManagerImpl_AddRef
(
IInternetSecurityManager
*
iface
)
{
{
SecManagerImpl
*
This
=
(
SecManagerImpl
*
)
iface
;
SecManagerImpl
*
This
=
(
SecManagerImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)
->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
InterlockedIncrement
(
&
This
->
ref
)
;
return
refCount
;
}
}
static
ULONG
WINAPI
SecManagerImpl_Release
(
IInternetSecurityManager
*
iface
)
static
ULONG
WINAPI
SecManagerImpl_Release
(
IInternetSecurityManager
*
iface
)
{
{
SecManagerImpl
*
This
=
(
SecManagerImpl
*
)
iface
;
SecManagerImpl
*
This
=
(
SecManagerImpl
*
)
iface
;
ULONG
ref
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)
\n
"
,
This
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
/* destroy the object if there's no more reference on it */
/* destroy the object if there's no more reference on it */
if
(
ref
==
0
){
if
(
!
refCount
){
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
return
ref
;
return
ref
Count
;
}
}
static
HRESULT
WINAPI
SecManagerImpl_SetSecuritySite
(
IInternetSecurityManager
*
iface
,
static
HRESULT
WINAPI
SecManagerImpl_SetSecuritySite
(
IInternetSecurityManager
*
iface
,
...
@@ -238,10 +238,11 @@ static HRESULT WINAPI ZoneMgrImpl_QueryInterface(IInternetZoneManager* iface, RE
...
@@ -238,10 +238,11 @@ static HRESULT WINAPI ZoneMgrImpl_QueryInterface(IInternetZoneManager* iface, RE
static
ULONG
WINAPI
ZoneMgrImpl_AddRef
(
IInternetZoneManager
*
iface
)
static
ULONG
WINAPI
ZoneMgrImpl_AddRef
(
IInternetZoneManager
*
iface
)
{
{
ZoneMgrImpl
*
This
=
(
ZoneMgrImpl
*
)
iface
;
ZoneMgrImpl
*
This
=
(
ZoneMgrImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
was %lu
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)
->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
InterlockedIncrement
(
&
This
->
ref
)
;
return
refCount
;
}
}
/********************************************************************
/********************************************************************
...
@@ -250,15 +251,13 @@ static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManager* iface)
...
@@ -250,15 +251,13 @@ static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManager* iface)
static
ULONG
WINAPI
ZoneMgrImpl_Release
(
IInternetZoneManager
*
iface
)
static
ULONG
WINAPI
ZoneMgrImpl_Release
(
IInternetZoneManager
*
iface
)
{
{
ZoneMgrImpl
*
This
=
(
ZoneMgrImpl
*
)
iface
;
ZoneMgrImpl
*
This
=
(
ZoneMgrImpl
*
)
iface
;
ULONG
ref
;
ULONG
ref
Count
=
InterlockedDecrement
(
&
This
->
ref
)
;
TRACE
(
"(%p) was %lu
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
ref
)
if
(
!
ref
Count
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
refCount
;
return
ref
;
}
}
/********************************************************************
/********************************************************************
...
...
dlls/urlmon/umon.c
View file @
79ecb0d7
...
@@ -103,10 +103,11 @@ static HRESULT WINAPI URLMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,
...
@@ -103,10 +103,11 @@ static HRESULT WINAPI URLMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,
static
ULONG
WINAPI
URLMonikerImpl_AddRef
(
IMoniker
*
iface
)
static
ULONG
WINAPI
URLMonikerImpl_AddRef
(
IMoniker
*
iface
)
{
{
URLMonikerImpl
*
This
=
(
URLMonikerImpl
*
)
iface
;
URLMonikerImpl
*
This
=
(
URLMonikerImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)
->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
InterlockedIncrement
(
&
This
->
ref
)
;
return
refCount
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -115,19 +116,17 @@ static ULONG WINAPI URLMonikerImpl_AddRef(IMoniker* iface)
...
@@ -115,19 +116,17 @@ static ULONG WINAPI URLMonikerImpl_AddRef(IMoniker* iface)
static
ULONG
WINAPI
URLMonikerImpl_Release
(
IMoniker
*
iface
)
static
ULONG
WINAPI
URLMonikerImpl_Release
(
IMoniker
*
iface
)
{
{
URLMonikerImpl
*
This
=
(
URLMonikerImpl
*
)
iface
;
URLMonikerImpl
*
This
=
(
URLMonikerImpl
*
)
iface
;
ULONG
ref
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)
\n
"
,
This
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
/* destroy the object if there's no more reference on it */
/* destroy the object if there's no more reference on it */
if
(
ref
==
0
)
{
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
URLName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
URLName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
return
ref
;
return
ref
Count
;
}
}
/******************************************************************************
/******************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment