Commit 58ebbf34 authored by Mythri's avatar Mythri Committed by Commit Bot

Fix JSTest/Proxies/Set.*Trap tests to return true from the trap

The spec specifies that a non-true return values from the trap functions
should be treated as error in the strict mode. With the new lazy feedback
effort inferring the language mode is expensive and causes regression on
these tests. Since the test doesn't actually need to test this, fixing
them to return true would help test the performance of calling the trap
without the unnecessary overhead of inferring the language mode.

Bug: chromium:925289
Change-Id: Ib650c3210ee260296257ae3b56174099a5492675
Reviewed-on: https://chromium-review.googlesource.com/c/1462959
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59505}
parent 214992e2
......@@ -373,7 +373,8 @@ newBenchmark("SetStringWithTrap", {
setup() {
p = new Proxy(obj, {
set: function(target, propertyKey, value, receiver) {
target[propertyKey] = SOME_OTHER_NUMBER
target[propertyKey] = SOME_OTHER_NUMBER;
return true;
}
});
},
......@@ -412,7 +413,8 @@ newBenchmark("SetIndexWithTrap", {
setup() {
p = new Proxy(obj, {
set: function(target, propertyKey, value, receiver) {
target[propertyKey] = SOME_OTHER_NUMBER
target[propertyKey] = SOME_OTHER_NUMBER;
return true;
}
});
},
......@@ -450,7 +452,8 @@ newBenchmark("SetSymbolWithTrap", {
setup() {
p = new Proxy(obj, {
set: function(target, propertyKey, value, receiver) {
target[propertyKey] = SOME_OTHER_NUMBER
target[propertyKey] = SOME_OTHER_NUMBER;
return true;
}
});
},
......
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