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

Unified Diff: src/flags.cc

Issue 435003: Patch for allowing several V8 instances in process:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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 | « src/factory.h ('k') | src/frame-element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/flags.cc
===================================================================
--- src/flags.cc (revision 3427)
+++ src/flags.cc (working copy)
@@ -338,11 +338,13 @@
return NULL;
}
+static MutexLockAdapter flag_list_lock(OS::CreateMutex());
// static
int FlagList::SetFlagsFromCommandLine(int* argc,
char** argv,
bool remove_flags) {
+ V8SharedStateLocker flags_list_locker(&flag_list_lock);
// parse arguments
for (int i = 1; i < *argc;) {
int j = i; // j > 0
@@ -469,6 +471,7 @@
// static
int FlagList::SetFlagsFromString(const char* str, int len) {
+ V8SharedStateLocker flags_list_locker(&flag_list_lock);
// make a 0-terminated copy of str
char* copy0 = NewArray<char>(len + 1);
memcpy(copy0, str, len);
« no previous file with comments | « src/factory.h ('k') | src/frame-element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698