From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/dispex.c | 6 ++++++ dlls/jscript/jscript.h | 9 +++++---- dlls/jscript/jsdisp.idl | 3 ++- dlls/mshtml/dispex.c | 2 +- dlls/mshtml/htmldoc.c | 3 +++ dlls/mshtml/htmlstorage.c | 1 + dlls/mshtml/htmlwindow.c | 1 + 7 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 5c72640a599..110c021b6b8 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -737,11 +737,15 @@ static HRESULT fill_props(jsdisp_t *obj) HRESULT hres; DWORD i;
+ if(obj->props_filled) + return S_OK; + for(i = 0; i < obj->builtin_info->props_cnt; i++) { hres = find_prop_name(obj, string_hash(obj->builtin_info->props[i].name), obj->builtin_info->props[i].name, FALSE, NULL, &prop); if(FAILED(hres)) return hres; } + hres = S_OK;
if(obj->builtin_info->fill_props) { hres = obj->builtin_info->fill_props(obj); @@ -749,6 +753,8 @@ static HRESULT fill_props(jsdisp_t *obj) return hres; }
+ if(hres == S_OK) + obj->props_filled = TRUE; return S_OK; }
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 6f4266edd44..4f21cae941b 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -198,10 +198,11 @@ struct jsdisp_t {
LONG ref;
- BOOLEAN has_weak_refs; - BOOLEAN extensible; - BOOLEAN gc_marked; - BOOLEAN is_constructor; + BOOLEAN is_constructor : 1; + BOOLEAN has_weak_refs : 1; + BOOLEAN props_filled : 1; + BOOLEAN extensible : 1; + BOOLEAN gc_marked : 1;
DWORD buf_size; DWORD prop_cnt; diff --git a/dlls/jscript/jsdisp.idl b/dlls/jscript/jsdisp.idl index a96214a98b6..22f22b641a4 100644 --- a/dlls/jscript/jsdisp.idl +++ b/dlls/jscript/jsdisp.idl @@ -39,7 +39,8 @@ const unsigned int PROPF_CONFIGURABLE = 0x1000;
const unsigned int PROPF_PUBLIC_MASK = PROPF_ENUMERABLE | PROPF_WRITABLE | PROPF_CONFIGURABLE;
-const unsigned int HOSTOBJ_CONSTRUCTOR = 0x0001; +const unsigned int HOSTOBJ_CONSTRUCTOR = 0x0001; +const unsigned int HOSTOBJ_VOLATILE_FILL = 0x0002;
interface IWineJSDispatchHost;
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 0290d61f04c..dc57cfd7703 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -2782,7 +2782,7 @@ static HRESULT WINAPI JSDispatchHost_FillProperties(IWineJSDispatchHost *iface) return hres; }
- return S_OK; + return (This->info->desc->js_flags & HOSTOBJ_VOLATILE_FILL) ? S_FALSE : S_OK; }
static HRESULT WINAPI JSDispatchHost_GetOuterDispatch(IWineJSDispatchHost *iface, IWineJSDispatchHost **ret) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index ca55b8e1d5b..b1ccd40031e 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -5764,6 +5764,7 @@ dispex_static_data_t Document_dispex = { .disp_tid = DispHTMLDocument_tid, .iface_tids = HTMLDocumentNode_iface_tids, .init_info = HTMLDocumentNode_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
dispex_static_data_t HTMLDocument_dispex = { @@ -5773,6 +5774,7 @@ dispex_static_data_t HTMLDocument_dispex = { .disp_tid = DispHTMLDocument_tid, .iface_tids = HTMLDocumentNode_iface_tids, .init_info = HTMLDocumentNode_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, .min_compat_mode = COMPAT_MODE_IE11, };
@@ -5906,6 +5908,7 @@ dispex_static_data_t DocumentFragment_dispex = { .disp_tid = DispHTMLDocument_tid, .iface_tids = DocumentFragment_iface_tids, .init_info = DocumentFragment_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node, HTMLDocumentNode **ret) diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c index 632469d0f9b..5f005c644ab 100644 --- a/dlls/mshtml/htmlstorage.c +++ b/dlls/mshtml/htmlstorage.c @@ -1298,6 +1298,7 @@ dispex_static_data_t Storage_dispex = { .vtbl = &Storage_dispex_vtbl, .disp_tid = IHTMLStorage_tid, .iface_tids = HTMLStorage_iface_tids, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
static HRESULT build_session_origin(IUri *uri, BSTR hostname, BSTR *ret) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index c964fdb9b02..615bac697b0 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -4245,6 +4245,7 @@ dispex_static_data_t Window_dispex = { .vtbl = &HTMLWindow_event_target_vtbl.dispex_vtbl, .disp_tid = DispHTMLWindow2_tid, .init_info = HTMLWindow_init_dispex_info, + .js_flags = HOSTOBJ_VOLATILE_FILL, };
static nsresult NSAPI outer_window_traverse(void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)