Bug 1570259 part 5 - Remove AutoSetHelperThreadContext from off-thread Ion and Wasm tasks. r=tcampbell,luke

Off-thread tasks now use a pool of JSContexts (for compatibility with the XPCOM thread pool).
Tasks that don't need a JSContext can run without one (nullptr TlsContext). We can now do this
for Ion and Wasm tasks too.

Depends on D41380

Differential Revision: https://phabricator.services.mozilla.com/D41381

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-08-09 15:27:10 +00:00
parent 23cbbf5845
commit 4d5c0d5eb6
3 changed files with 1 additions and 6 deletions

View File

@ -1144,7 +1144,6 @@ AbortReasonOr<Ok> IonBuilder::buildInline(IonBuilder* callerBuilder,
void IonBuilder::runTask() {
// This is the entry point when ion compiles are run offthread.
JSRuntime* rt = script()->runtimeFromAnyThread();
AutoSetHelperThreadContext usesContext;
TraceLoggerThread* logger = TraceLoggerForCurrentThread();
TraceLoggerEvent event(TraceLogger_AnnotateScripts, script());

View File

@ -1259,10 +1259,7 @@ bool ModuleGenerator::finishTier2(const Module& module) {
return module.finishTier2(*linkData_, std::move(codeTier));
}
void CompileTask::runTask() {
AutoSetHelperThreadContext needsContext;
ExecuteCompileTaskFromHelperThread(this);
}
void CompileTask::runTask() { ExecuteCompileTaskFromHelperThread(this); }
size_t CompiledCode::sizeOfExcludingThis(
mozilla::MallocSizeOf mallocSizeOf) const {

View File

@ -62,7 +62,6 @@ class Module::Tier2GeneratorTaskImpl : public Tier2GeneratorTask {
void cancel() override { cancelled_ = true; }
void runTask() override {
AutoSetHelperThreadContext usesContext;
CompileTier2(*compileArgs_, bytecode_->bytes, *module_, &cancelled_);
}
ThreadType threadType() override {