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
cd30018d
Commit
cd30018d
authored
May 11, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Get rid of no longer needed thread checking in Binding::ReportProgress.
parent
8ea07306
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
88 deletions
+3
-88
binding.c
dlls/urlmon/binding.c
+3
-88
No files found.
dlls/urlmon/binding.c
View file @
cd30018d
...
...
@@ -127,23 +127,6 @@ struct Binding {
#define WM_MK_CONTINUE (WM_USER+101)
#define WM_MK_RELEASE (WM_USER+102)
static
void
push_task
(
Binding
*
binding
,
task_header_t
*
task
,
task_proc_t
proc
)
{
task
->
proc
=
proc
;
task
->
next
=
NULL
;
EnterCriticalSection
(
&
binding
->
section
);
if
(
binding
->
task_queue_tail
)
{
binding
->
task_queue_tail
->
next
=
task
;
binding
->
task_queue_tail
=
task
;
}
else
{
binding
->
task_queue_tail
=
binding
->
task_queue_head
=
task
;
}
LeaveCriticalSection
(
&
binding
->
section
);
}
static
task_header_t
*
pop_task
(
Binding
*
binding
)
{
task_header_t
*
ret
;
...
...
@@ -353,32 +336,12 @@ static void handle_mime_available(Binding *binding, BOOL verify)
binding
->
clipboard_format
=
RegisterClipboardFormatW
(
binding
->
mime
);
}
typedef
struct
{
task_header_t
header
;
BOOL
verify
;
}
mime_available_task_t
;
static
void
mime_available_proc
(
Binding
*
binding
,
task_header_t
*
t
)
{
mime_available_task_t
*
task
=
(
mime_available_task_t
*
)
t
;
handle_mime_available
(
binding
,
task
->
verify
);
heap_free
(
task
);
}
static
void
mime_available
(
Binding
*
This
,
LPCWSTR
mime
,
BOOL
verify
)
{
if
(
mime
)
set_binding_mime
(
This
,
mime
);
if
(
GetCurrentThreadId
()
==
This
->
apartment_thread
)
{
handle_mime_available
(
This
,
verify
);
}
else
{
mime_available_task_t
*
task
=
heap_alloc
(
sizeof
(
task_header_t
));
task
->
verify
=
verify
;
push_task
(
This
,
&
task
->
header
,
mime_available_proc
);
}
handle_mime_available
(
This
,
verify
);
}
static
void
stop_binding
(
Binding
*
binding
,
HRESULT
hres
,
LPCWSTR
str
)
...
...
@@ -1137,59 +1100,11 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface,
return
E_FAIL
;
}
typedef
struct
{
task_header_t
header
;
Binding
*
binding
;
ULONG
progress
;
ULONG
progress_max
;
ULONG
status_code
;
LPWSTR
status_text
;
}
on_progress_task_t
;
static
void
on_progress_proc
(
Binding
*
binding
,
task_header_t
*
t
)
{
on_progress_task_t
*
task
=
(
on_progress_task_t
*
)
t
;
IBindStatusCallback_OnProgress
(
binding
->
callback
,
task
->
progress
,
task
->
progress_max
,
task
->
status_code
,
task
->
status_text
);
heap_free
(
task
->
status_text
);
heap_free
(
task
);
}
static
void
on_progress
(
Binding
*
This
,
ULONG
progress
,
ULONG
progress_max
,
ULONG
status_code
,
LPCWSTR
status_text
)
{
on_progress_task_t
*
task
;
if
(
GetCurrentThreadId
()
==
This
->
apartment_thread
&&
!
This
->
continue_call
)
{
IBindStatusCallback_OnProgress
(
This
->
callback
,
progress
,
progress_max
,
status_code
,
status_text
);
return
;
}
task
=
heap_alloc
(
sizeof
(
on_progress_task_t
));
task
->
progress
=
progress
;
task
->
progress_max
=
progress_max
;
task
->
status_code
=
status_code
;
if
(
status_text
)
{
DWORD
size
=
(
strlenW
(
status_text
)
+
1
)
*
sizeof
(
WCHAR
);
task
->
status_text
=
heap_alloc
(
size
);
memcpy
(
task
->
status_text
,
status_text
,
size
);
}
else
{
task
->
status_text
=
NULL
;
}
push_task
(
This
,
&
task
->
header
,
on_progress_proc
);
if
(
GetCurrentThreadId
()
!=
This
->
apartment_thread
)
{
IBinding_AddRef
(
BINDING
(
This
));
PostMessageW
(
This
->
notif_hwnd
,
WM_MK_CONTINUE
,
0
,
(
LPARAM
)
This
);
}
IBindStatusCallback_OnProgress
(
This
->
callback
,
progress
,
progress_max
,
status_code
,
status_text
);
}
static
HRESULT
WINAPI
InternetProtocolSink_ReportProgress
(
IInternetProtocolSink
*
iface
,
...
...
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