Hi Hans,
On 5/23/22 10:01, Hans Leidekker wrote:
@@ -201,7 +435,7 @@ static dispex_static_data_t HTMLStorage_dispex = { HTMLStorage_iface_tids };
-HRESULT create_html_storage(compat_mode_t compat_mode, IHTMLStorage **p) +HRESULT create_html_storage(compat_mode_t compat_mode, HTMLInnerWindow *window, IHTMLStorage **p) { HTMLStorage *storage;
@@ -211,6 +445,7 @@ HRESULT create_html_storage(compat_mode_t compat_mode, IHTMLStorage **p)
storage->IHTMLStorage_iface.lpVtbl = &HTMLStorageVtbl; storage->ref = 1;
- storage->window = window;
This does not seem right, HTMLStorage object may potentially live longer than window object. To make it a proper weak reference, you'd need to invalidate the reference in window object destructor. However, note that host of inner window does not change (if outer window's URL changes, a new inner window is created), so it would be probably more convenient to just compute file path in create_html_store and store just that.
Thanks,
Jacek