[PATCH 2/3] jscript: Set return object's class to 'object' in Object.create.
Jeff Smith
whydoubt at gmail.com
Mon Mar 16 23:36:37 CDT 2020
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48762
Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
dlls/jscript/object.c | 2 +-
dlls/mshtml/tests/es5.js | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c
index 3cac277775..268cfaa1c3 100644
--- a/dlls/jscript/object.c
+++ b/dlls/jscript/object.c
@@ -612,7 +612,7 @@ static HRESULT Object_create(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
return E_INVALIDARG;
}
- hres = create_dispex(ctx, NULL, proto, &obj);
+ hres = create_dispex(ctx, &ObjectInst_info, proto, &obj);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js
index 7a5b9d57ea..6b5d04a959 100644
--- a/dlls/mshtml/tests/es5.js
+++ b/dlls/mshtml/tests/es5.js
@@ -768,7 +768,7 @@ function test_getPrototypeOf() {
}
function test_toString() {
- var tmp;
+ var tmp, obj;
(function () { tmp = Object.prototype.toString.call(arguments); })();
todo_wine.
@@ -786,6 +786,13 @@ function test_toString() {
todo_wine.
ok(tmp === "[object Undefined]", "toString.call() = " + tmp);
+ obj = Object.create(null);
+ tmp = Object.prototype.toString.call(obj);
+ ok(tmp === "[object Object]", "toString.call(Object.create(null)) = " + tmp);
+ obj = Object.create(Number.prototype);
+ tmp = Object.prototype.toString.call(obj);
+ ok(tmp === "[object Object]", "toString.call(Object.create(Number.prototype)) = " + tmp);
+
next_test();
}
--
2.23.0
More information about the wine-devel
mailing list