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:
parent
79cde059ea
commit
dd678df789
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue