jscript: Return the correct string for Object.toString(undefined) in ES5+ modes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
598709f872
commit
47b02e8c1e
|
@ -60,7 +60,7 @@ static HRESULT Object_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, uns
|
|||
if(ctx->version < SCRIPTLANGUAGEVERSION_ES5)
|
||||
str = L"[object Object]";
|
||||
else
|
||||
str = is_null(vthis) ? L"[object Null]" : L"[object Object]";
|
||||
str = is_null(vthis) ? L"[object Null]" : L"[object Undefined]";
|
||||
goto set_output;
|
||||
}
|
||||
|
||||
|
|
|
@ -807,10 +807,8 @@ sync_test("toString", function() {
|
|||
tmp = Object.prototype.toString.call(null);
|
||||
ok(tmp === "[object Null]", "toString.call(null) = " + tmp);
|
||||
tmp = Object.prototype.toString.call(undefined);
|
||||
todo_wine.
|
||||
ok(tmp === "[object Undefined]", "toString.call(undefined) = " + tmp);
|
||||
tmp = Object.prototype.toString.call();
|
||||
todo_wine.
|
||||
ok(tmp === "[object Undefined]", "toString.call() = " + tmp);
|
||||
|
||||
obj = Object.create(null);
|
||||
|
|
Loading…
Reference in New Issue