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
7247eaa1
Commit
7247eaa1
authored
Aug 03, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Allow async tasks to have custom destructors.
parent
7a0600dc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
+17
-10
htmlwindow.c
dlls/mshtml/htmlwindow.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-1
navigate.c
dlls/mshtml/navigate.c
+2
-2
nsio.c
dlls/mshtml/nsio.c
+1
-1
persist.c
dlls/mshtml/persist.c
+2
-2
task.c
dlls/mshtml/task.c
+8
-2
No files found.
dlls/mshtml/htmlwindow.c
View file @
7247eaa1
...
...
@@ -1847,7 +1847,7 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface,
task
->
window
=
This
;
task
->
bscallback
=
bsc
;
task
->
mon
=
mon
;
push_task
(
&
task
->
header
,
navigate_proc
,
This
->
task_magic
);
push_task
(
&
task
->
header
,
navigate_proc
,
NULL
,
This
->
task_magic
);
/* Silently and repeated when real loading starts? */
This
->
readystate
=
READYSTATE_LOADING
;
...
...
@@ -1866,7 +1866,7 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface,
IHTMLWindow2_AddRef
(
&
This
->
IHTMLWindow2_iface
);
task
->
window
=
This
;
task
->
uri
=
uri
;
push_task
(
&
task
->
header
,
navigate_javascript_proc
,
This
->
task_magic
);
push_task
(
&
task
->
header
,
navigate_javascript_proc
,
NULL
,
This
->
task_magic
);
/* Why silently? */
This
->
readystate
=
READYSTATE_COMPLETE
;
...
...
dlls/mshtml/mshtml_private.h
View file @
7247eaa1
...
...
@@ -817,6 +817,7 @@ typedef void (*task_proc_t)(task_t*);
struct
task_t
{
LONG
target_magic
;
task_proc_t
proc
;
task_proc_t
destr
;
struct
task_t
*
next
;
};
...
...
@@ -836,7 +837,7 @@ thread_data_t *get_thread_data(BOOL) DECLSPEC_HIDDEN;
HWND
get_thread_hwnd
(
void
)
DECLSPEC_HIDDEN
;
LONG
get_task_target_magic
(
void
)
DECLSPEC_HIDDEN
;
void
push_task
(
task_t
*
,
task_proc_t
,
LONG
)
DECLSPEC_HIDDEN
;
void
push_task
(
task_t
*
,
task_proc_t
,
task_proc_t
,
LONG
)
DECLSPEC_HIDDEN
;
void
remove_target_tasks
(
LONG
)
DECLSPEC_HIDDEN
;
DWORD
set_task_timer
(
HTMLDocument
*
,
DWORD
,
BOOL
,
IDispatch
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
7247eaa1
...
...
@@ -1242,7 +1242,7 @@ static HRESULT async_stop_request(nsChannelBSC *This)
IBindStatusCallback_AddRef
(
&
This
->
bsc
.
IBindStatusCallback_iface
);
task
->
bsc
=
This
;
push_task
(
&
task
->
header
,
stop_request_proc
,
This
->
bsc
.
doc
->
basedoc
.
doc_obj
->
basedoc
.
task_magic
);
push_task
(
&
task
->
header
,
stop_request_proc
,
NULL
,
This
->
bsc
.
doc
->
basedoc
.
doc_obj
->
basedoc
.
task_magic
);
return
S_OK
;
}
...
...
@@ -1606,7 +1606,7 @@ HRESULT async_start_doc_binding(HTMLWindow *window, nsChannelBSC *bscallback)
task
->
bscallback
=
bscallback
;
IBindStatusCallback_AddRef
(
&
bscallback
->
bsc
.
IBindStatusCallback_iface
);
push_task
(
&
task
->
header
,
start_doc_binding_proc
,
window
->
task_magic
);
push_task
(
&
task
->
header
,
start_doc_binding_proc
,
NULL
,
window
->
task_magic
);
return
S_OK
;
}
...
...
dlls/mshtml/nsio.c
View file @
7247eaa1
...
...
@@ -925,7 +925,7 @@ static nsresult async_open(nsChannel *This, HTMLWindow *window, BOOL is_doc_chan
task
->
doc
=
window
->
doc
;
task
->
bscallback
=
bscallback
;
push_task
(
&
task
->
header
,
start_binding_proc
,
window
->
doc
->
basedoc
.
task_magic
);
push_task
(
&
task
->
header
,
start_binding_proc
,
NULL
,
window
->
doc
->
basedoc
.
task_magic
);
}
return
NS_OK
;
...
...
dlls/mshtml/persist.c
View file @
7247eaa1
...
...
@@ -296,14 +296,14 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel
task
=
heap_alloc
(
sizeof
(
docobj_task_t
));
task
->
doc
=
This
->
doc_obj
;
push_task
(
&
task
->
header
,
set_progress_proc
,
This
->
doc_obj
->
basedoc
.
task_magic
);
push_task
(
&
task
->
header
,
set_progress_proc
,
NULL
,
This
->
doc_obj
->
basedoc
.
task_magic
);
}
download_task
=
heap_alloc
(
sizeof
(
download_proc_task_t
));
download_task
->
doc
=
This
->
doc_obj
;
download_task
->
set_download
=
set_download
;
download_task
->
url
=
url
;
push_task
(
&
download_task
->
header
,
set_downloading_proc
,
This
->
doc_obj
->
basedoc
.
task_magic
);
push_task
(
&
download_task
->
header
,
set_downloading_proc
,
NULL
,
This
->
doc_obj
->
basedoc
.
task_magic
);
return
S_OK
;
}
...
...
dlls/mshtml/task.c
View file @
7247eaa1
...
...
@@ -47,12 +47,18 @@ typedef struct {
struct
list
entry
;
}
task_timer_t
;
void
push_task
(
task_t
*
task
,
task_proc_t
proc
,
LONG
magic
)
static
void
default_task_destr
(
task_t
*
task
)
{
heap_free
(
task
);
}
void
push_task
(
task_t
*
task
,
task_proc_t
proc
,
task_proc_t
destr
,
LONG
magic
)
{
thread_data_t
*
thread_data
=
get_thread_data
(
TRUE
);
task
->
target_magic
=
magic
;
task
->
proc
=
proc
;
task
->
destr
=
destr
?
destr
:
default_task_destr
;
task
->
next
=
NULL
;
if
(
thread_data
->
task_queue_tail
)
...
...
@@ -266,7 +272,7 @@ static LRESULT WINAPI hidden_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
break
;
task
->
proc
(
task
);
heap_free
(
task
);
task
->
destr
(
task
);
}
return
0
;
...
...
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