mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1127827, part 3 - Weak map get should always return undefined on failure to find the key. r=Waldo,jgraham
This commit is contained in:
parent
250ca51bbc
commit
fd32bda0ad
@ -2,7 +2,6 @@
|
||||
"WeakMap.prototype.clear.length": true,
|
||||
"WeakMap.prototype.delete.length": true,
|
||||
"WeakMap.prototype.get.length": true,
|
||||
"WeakMap.prototype.get: return undefined": true,
|
||||
"WeakMap.prototype.has.length": true,
|
||||
"WeakMap.prototype.set.length": true
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ WeakMap_get_impl(JSContext *cx, CallArgs args)
|
||||
}
|
||||
}
|
||||
|
||||
args.rval().set((args.length() > 1) ? args[1] : UndefinedValue());
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ function test()
|
||||
check(function() map.set(key, 42) === map);
|
||||
check(function() map.get(key) == 42);
|
||||
check(function() typeof map.get({}) == "undefined");
|
||||
check(function() map.get({}, "foo") == "foo");
|
||||
check(function() map.get({}, "foo") == undefined);
|
||||
|
||||
gc(); gc(); gc();
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
[WeakMap.prototype-properties.html]
|
||||
type: testharness
|
||||
|
||||
[WeakMap.prototype.get.length]
|
||||
expected: FAIL
|
||||
|
||||
[WeakMap.prototype.get: return undefined]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user