Bug 785905 followup - Fix --disable-threadsafe shell builds.

This commit is contained in:
Jan de Mooij 2013-12-17 14:48:21 +01:00
parent f394972e75
commit 1c8332fe30
2 changed files with 10 additions and 0 deletions

View File

@ -231,9 +231,11 @@ CompileCompartment::hasObjectMetadataCallback()
return compartment()->hasObjectMetadataCallback(); return compartment()->hasObjectMetadataCallback();
} }
#ifdef JS_WORKER_THREADS
AutoLockForCompilation::AutoLockForCompilation(CompileCompartment *compartment AutoLockForCompilation::AutoLockForCompilation(CompileCompartment *compartment
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
{ {
MOZ_GUARD_OBJECT_NOTIFIER_INIT; MOZ_GUARD_OBJECT_NOTIFIER_INIT;
init(compartment->compartment()->runtimeFromAnyThread()); init(compartment->compartment()->runtimeFromAnyThread());
} }
#endif

View File

@ -863,11 +863,19 @@ struct JSRuntime : public JS::shadow::Runtime,
} }
void addCompilationThread() { void addCompilationThread() {
#ifdef JS_WORKER_THREADS
numCompilationThreads++; numCompilationThreads++;
#else
MOZ_ASSUME_UNREACHABLE("No threads");
#endif
} }
void removeCompilationThread() { void removeCompilationThread() {
#ifdef JS_WORKER_THREADS
JS_ASSERT(numCompilationThreads); JS_ASSERT(numCompilationThreads);
numCompilationThreads--; numCompilationThreads--;
#else
MOZ_ASSUME_UNREACHABLE("No threads");
#endif
} }
bool compilationThreadsPresent() const { bool compilationThreadsPresent() const {