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

Unified Diff: src/d8.h

Issue 1208733002: Fix cluster-fuzz regression when getting message from Worker (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: don't remove Worker from workers_ on terminate Created 5 years, 6 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
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index 23b66e4c3234b9f7871ee0c47c4e07895626345e..490fb770915c0dad7fe85ad4d6f040f3ac1a2ca8 100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -257,6 +257,8 @@ class Worker {
Worker* worker_;
};
+ enum State { IDLE, RUNNING, TERMINATED };
+
void ExecuteInThread();
void Cleanup();
static void PostMessageOut(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -267,6 +269,7 @@ class Worker {
SerializationDataQueue out_queue_;
base::Thread* thread_;
char* script_;
+ base::Atomic32 state_;
};
#endif // !V8_SHARED
@@ -461,6 +464,9 @@ class Shell : public i::AllStatic {
static base::OS::MemoryMappedFile* counters_file_;
static base::Mutex context_mutex_;
static const base::TimeTicks kInitialTicks;
+
+ static base::Mutex workers_mutex_;
+ static bool allow_new_workers_;
static i::List<Worker*> workers_;
static i::List<SharedArrayBuffer::Contents> externalized_shared_contents_;
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698