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

Unified Diff: src/d8.cc

Issue 1258303004: Avoid data race when writing Shell::options.script_executed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 9aeac11bb0a439b59a8933a6b15cdc8f0ac1116f..4a52ca36a343e2cca71471629215603a10a7161e 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -296,7 +296,6 @@ bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
bool report_exceptions, SourceType source_type) {
HandleScope handle_scope(isolate);
TryCatch try_catch(isolate);
- options.script_executed = true;
MaybeLocal<Value> maybe_result;
{
@@ -1427,6 +1426,7 @@ void SourceGroup::Execute(Isolate* isolate) {
Local<String> source =
String::NewFromUtf8(isolate, argv_[i + 1], NewStringType::kNormal)
.ToLocalChecked();
+ Shell::options.script_executed = true;
if (!Shell::ExecuteString(isolate, source, file_name, false, true)) {
exception_was_thrown = true;
break;
@@ -1452,6 +1452,7 @@ void SourceGroup::Execute(Isolate* isolate) {
printf("Error reading '%s'\n", arg);
Shell::Exit(1);
}
+ Shell::options.script_executed = true;
if (!Shell::ExecuteString(isolate, source, file_name, false, true,
source_type)) {
exception_was_thrown = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698