Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: src/js/harmony-atomics.js

Issue 2659083004: [SAB] Fix crash in Atomics.wake w/ infinite count. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/js/harmony-atomics.js
diff --git a/src/js/harmony-atomics.js b/src/js/harmony-atomics.js
index bfbf0c505e54bab3ff298f370de8d54c903114af..4f9d6218ff13b7f3eeb25120f1ef663169cae146 100644
--- a/src/js/harmony-atomics.js
+++ b/src/js/harmony-atomics.js
@@ -123,7 +123,11 @@ function AtomicsWaitJS(ia, index, value, timeout) {
function AtomicsWakeJS(ia, index, count) {
CheckSharedInteger32TypedArray(ia);
index = ValidateIndex(index, %_TypedArrayGetLength(ia));
- count = MaxSimple(0, TO_INTEGER(count));
+ if (IS_UNDEFINED(count)) {
+ count = INFINITY;
+ } else {
+ count = MaxSimple(0, TO_INTEGER(count));
+ }
return %AtomicsWake(ia, index, count);
}

Powered by Google App Engine
This is Rietveld 408576698