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
88f7fd5d
Commit
88f7fd5d
authored
May 24, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
May 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use TLS_OUT_OF_INDEXES as invalid TLS value.
Spotted by Vitaliy Margolen.
parent
08d8a5ea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
main.c
dlls/mshtml/main.c
+2
-2
task.c
dlls/mshtml/task.c
+12
-4
No files found.
dlls/mshtml/main.c
View file @
88f7fd5d
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
HINSTANCE
hInst
;
HINSTANCE
hInst
;
DWORD
mshtml_tls
=
0
;
DWORD
mshtml_tls
=
TLS_OUT_OF_INDEXES
;
static
HINSTANCE
shdoclc
=
NULL
;
static
HINSTANCE
shdoclc
=
NULL
;
...
@@ -69,7 +69,7 @@ static void process_detach(void)
...
@@ -69,7 +69,7 @@ static void process_detach(void)
if
(
shdoclc
)
if
(
shdoclc
)
FreeLibrary
(
shdoclc
);
FreeLibrary
(
shdoclc
);
if
(
mshtml_tls
)
if
(
mshtml_tls
!=
TLS_OUT_OF_INDEXES
)
TlsFree
(
mshtml_tls
);
TlsFree
(
mshtml_tls
);
}
}
...
...
dlls/mshtml/task.c
View file @
88f7fd5d
...
@@ -478,11 +478,19 @@ thread_data_t *get_thread_data(BOOL create)
...
@@ -478,11 +478,19 @@ thread_data_t *get_thread_data(BOOL create)
{
{
thread_data_t
*
thread_data
;
thread_data_t
*
thread_data
;
if
(
!
mshtml_tls
)
{
if
(
mshtml_tls
==
TLS_OUT_OF_INDEXES
)
{
if
(
create
)
DWORD
tls
;
mshtml_tls
=
TlsAlloc
();
else
if
(
!
create
)
return
NULL
;
return
NULL
;
tls
=
TlsAlloc
();
if
(
tls
==
TLS_OUT_OF_INDEXES
)
return
NULL
;
tls
=
InterlockedCompareExchange
((
LONG
*
)
&
mshtml_tls
,
tls
,
TLS_OUT_OF_INDEXES
);
if
(
tls
!=
mshtml_tls
)
TlsFree
(
tls
);
}
}
thread_data
=
TlsGetValue
(
mshtml_tls
);
thread_data
=
TlsGetValue
(
mshtml_tls
);
...
...
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