Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
132bc714
Commit
132bc714
authored
Jul 02, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better module locking.
parent
c64432ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
sec_mgr.c
dlls/urlmon/sec_mgr.c
+9
-9
umon.c
dlls/urlmon/umon.c
+4
-4
urlmon_main.c
dlls/urlmon/urlmon_main.c
+7
-7
No files found.
dlls/urlmon/sec_mgr.c
View file @
132bc714
...
...
@@ -82,8 +82,6 @@ static ULONG WINAPI SecManagerImpl_AddRef(IInternetSecurityManager* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
URLMON_LockModule
();
return
refCount
;
}
...
...
@@ -97,10 +95,9 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManager* iface)
/* destroy the object if there's no more reference on it */
if
(
!
refCount
){
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
}
URLMON_UnlockModule
();
return
refCount
;
}
...
...
@@ -201,6 +198,9 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
This
->
ref
=
1
;
*
ppobj
=
This
;
URLMON_LockModule
();
return
S_OK
;
}
...
...
@@ -247,8 +247,6 @@ static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManager* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
URLMON_LockModule
();
return
refCount
;
}
...
...
@@ -262,10 +260,10 @@ static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManager* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
URLMON_UnlockModule
();
}
return
refCount
;
}
...
...
@@ -457,6 +455,8 @@ HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret
->
ref
=
1
;
*
ppobj
=
(
IInternetZoneManager
*
)
ret
;
URLMON_LockModule
();
return
S_OK
;
}
...
...
dlls/urlmon/umon.c
View file @
132bc714
...
...
@@ -340,8 +340,6 @@ static ULONG WINAPI URLMonikerImpl_AddRef(IMoniker* iface)
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
URLMON_LockModule
();
return
refCount
;
}
...
...
@@ -359,9 +357,9 @@ static ULONG WINAPI URLMonikerImpl_Release(IMoniker* iface)
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
URLName
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
URLMON_UnlockModule
();
URLMON_UnlockModule
();
}
return
refCount
;
}
...
...
@@ -1170,6 +1168,8 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft
else
strcpyW
(
This
->
URLName
,
lpszURLName
);
URLMON_LockModule
();
return
S_OK
;
}
...
...
dlls/urlmon/urlmon_main.c
View file @
132bc714
...
...
@@ -125,8 +125,6 @@ CF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
static
ULONG
WINAPI
CF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
URLMON_LockModule
();
return
InterlockedIncrement
(
&
This
->
ref
);
}
...
...
@@ -136,10 +134,10 @@ static ULONG WINAPI CF_Release(LPCLASSFACTORY iface)
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
}
return
ref
;
}
...
...
@@ -229,10 +227,12 @@ DWORD WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
factory
->
ITF_IClassFactory
.
lpVtbl
=
&
CF_Vtbl
;
factory
->
ref
=
1
;
factory
->
pfnCreateInstance
=
object_creation
[
i
].
pfnCreateInstance
;
*
ppv
=
&
(
factory
->
ITF_IClassFactory
);
URLMON_LockModule
();
return
S_OK
;
}
...
...
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