Jacek Caban : mshtml: Return null from IHTMLStorage::getItem stub.

Alexandre Julliard julliard at winehq.org
Wed Apr 21 15:57:54 CDT 2021


Module: wine
Branch: master
Commit: 655adf6521f131c581229077621354c7c91f3b4c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=655adf6521f131c581229077621354c7c91f3b4c

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Apr 21 17:23:41 2021 +0200

mshtml: Return null from IHTMLStorage::getItem stub.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlstorage.c | 5 ++++-
 dlls/mshtml/tests/dom.js  | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c
index 3b16027a5f9..c3896475270 100644
--- a/dlls/mshtml/htmlstorage.c
+++ b/dlls/mshtml/htmlstorage.c
@@ -145,8 +145,11 @@ static HRESULT WINAPI HTMLStorage_key(IHTMLStorage *iface, LONG lIndex, BSTR *p)
 static HRESULT WINAPI HTMLStorage_getItem(IHTMLStorage *iface, BSTR bstrKey, VARIANT *p)
 {
     HTMLStorage *This = impl_from_IHTMLStorage(iface);
+
     FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrKey), p);
-    return E_NOTIMPL;
+
+    V_VT(p) = VT_NULL;
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLStorage_setItem(IHTMLStorage *iface, BSTR bstrKey, BSTR bstrValue)
diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js
index 564ca87821a..f5e4f393b58 100644
--- a/dlls/mshtml/tests/dom.js
+++ b/dlls/mshtml/tests/dom.js
@@ -412,6 +412,9 @@ sync_test("storage", function() {
        "typeof(window.sessionStorage) = " + typeof(window.sessionStorage));
     ok(typeof(window.localStorage) === "object" || typeof(window.localStorage) === "unknown",
        "typeof(window.localStorage) = " + typeof(window.localStorage));
+
+    var item = sessionStorage.getItem("nonexisting");
+    ok(item === null, "item = " + item);
 });
 
 async_test("animation", function() {




More information about the wine-cvs mailing list