Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/set.c | 3 ++- dlls/mshtml/tests/documentmode.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/set.c b/dlls/jscript/set.c index 640bf44..dd6829d 100644 --- a/dlls/jscript/set.c +++ b/dlls/jscript/set.c @@ -179,11 +179,12 @@ static HRESULT iterate_map(MapInstance *map, script_ctx_t *ctx, unsigned argc, j }
LIST_FOR_EACH_ENTRY(entry, &map->entries, struct jsval_map_entry, list_entry) { - jsval_t args[2], v; + jsval_t args[3], v; if(entry->deleted) continue; args[0] = entry->value; args[1] = entry->key; + args[2] = jsval_obj(&map->dispex); grab_map_entry(entry); hres = disp_call_value(ctx, get_object(argv[0]), NULL, DISPATCH_METHOD, ARRAY_SIZE(args), args, &v); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 28450f7..ed41ac1 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -995,7 +995,7 @@ sync_test("map_obj", function() {
var calls = []; i = 0; - r = s.forEach(function(value, key) { + r = s.forEach(function(value, key, map) { if(isNaN(test_keys[i])) { ok(isNaN(key), "key = " + key + " expected NaN"); ok(isNaN(value), "value = " + value + " expected NaN"); @@ -1003,6 +1003,7 @@ sync_test("map_obj", function() { ok(key === test_keys[i], "key = " + key + " expected " + test_keys[i]); ok(value === key + 1, "value = " + value); } + ok(map === s, "map = " + map); i++; }); ok(i === test_keys.length, "i = " + i);