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

Unified Diff: src/futex-emulation.cc

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/futex-emulation.cc
diff --git a/src/futex-emulation.cc b/src/futex-emulation.cc
index 9374986cde79fae65be4f6cae423d349353d8dd1..43db1b4914e480910e97bc4bba47a73fc2f29131 100644
--- a/src/futex-emulation.cc
+++ b/src/futex-emulation.cc
@@ -188,11 +188,11 @@ Object* FutexEmulation::Wait(Isolate* isolate,
return result;
}
-
Object* FutexEmulation::Wake(Isolate* isolate,
Handle<JSArrayBuffer> array_buffer, size_t addr,
- int num_waiters_to_wake) {
+ double num_waiters_to_wake) {
DCHECK(addr < NumberToSize(array_buffer->byte_length()));
+ DCHECK(num_waiters_to_wake >= 0);
int waiters_woken = 0;
void* backing_store = array_buffer->backing_store();
« src/futex-emulation.h ('K') | « src/futex-emulation.h ('k') | src/js/harmony-atomics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698