Commit 47b02e8c authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

jscript: Return the correct string for Object.toString(undefined) in ES5+ modes.

parent 598709f8
...@@ -60,7 +60,7 @@ static HRESULT Object_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, uns ...@@ -60,7 +60,7 @@ static HRESULT Object_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, uns
if(ctx->version < SCRIPTLANGUAGEVERSION_ES5) if(ctx->version < SCRIPTLANGUAGEVERSION_ES5)
str = L"[object Object]"; str = L"[object Object]";
else else
str = is_null(vthis) ? L"[object Null]" : L"[object Object]"; str = is_null(vthis) ? L"[object Null]" : L"[object Undefined]";
goto set_output; goto set_output;
} }
......
...@@ -807,10 +807,8 @@ sync_test("toString", function() { ...@@ -807,10 +807,8 @@ sync_test("toString", function() {
tmp = Object.prototype.toString.call(null); tmp = Object.prototype.toString.call(null);
ok(tmp === "[object Null]", "toString.call(null) = " + tmp); ok(tmp === "[object Null]", "toString.call(null) = " + tmp);
tmp = Object.prototype.toString.call(undefined); tmp = Object.prototype.toString.call(undefined);
todo_wine.
ok(tmp === "[object Undefined]", "toString.call(undefined) = " + tmp); ok(tmp === "[object Undefined]", "toString.call(undefined) = " + tmp);
tmp = Object.prototype.toString.call(); tmp = Object.prototype.toString.call();
todo_wine.
ok(tmp === "[object Undefined]", "toString.call() = " + tmp); ok(tmp === "[object Undefined]", "toString.call() = " + tmp);
obj = Object.create(null); obj = Object.create(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment