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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher-job.cc

Issue 2197573002: Clean up compiler dispatcher job a bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/compiler-dispatcher/compiler-dispatcher-job.cc
diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc
index 382d94ba6df04c5c27f6ad5a3bb84edeffeb25c5..8234ae214092ee4a99363c04b661bc34bb3942bf 100644
--- a/src/compiler-dispatcher/compiler-dispatcher-job.cc
+++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc
@@ -27,13 +27,8 @@ CompilerDispatcherJob::CompilerDispatcherJob(Isolate* isolate,
Handle<SharedFunctionInfo> shared(function_->shared(), isolate_);
Handle<Script> script(Script::cast(shared->script()), isolate_);
Handle<String> source(String::cast(script->source()), isolate_);
- if (source->IsExternalTwoByteString()) {
- can_parse_on_background_thread_ = true;
- } else if (source->IsExternalOneByteString()) {
- can_parse_on_background_thread_ = true;
- } else {
- can_parse_on_background_thread_ = false;
- }
+ can_parse_on_background_thread_ =
+ source->IsExternalTwoByteString() || source->IsExternalOneByteString();
}
CompilerDispatcherJob::~CompilerDispatcherJob() {
@@ -71,7 +66,7 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
parse_info_->set_hash_seed(isolate_->heap()->HashSeed());
parse_info_->set_unicode_cache(unicode_cache_.get());
parser_.reset(new Parser(parse_info_.get()));
- status_.SetValue(CompileJobStatus::kReadyToParse);
+ status_ = CompileJobStatus::kReadyToParse;
}
void CompilerDispatcherJob::Parse() {
@@ -95,7 +90,7 @@ void CompilerDispatcherJob::Parse() {
parse_info_->set_isolate(isolate_);
- status_.SetValue(CompileJobStatus::kParsed);
+ status_ = CompileJobStatus::kParsed;
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698