jscript: Set return object's class to 'object' in Object.create.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48762
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jeff Smith 2020-03-16 23:36:37 -05:00 committed by Alexandre Julliard
parent 79cde059ea
commit dd678df789
2 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -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();
}