mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 951979 - Reorder compilation vs. operation callback lock ordering constraints, r=jandem.
This commit is contained in:
parent
5514a61695
commit
a95605b1f8
@ -1089,10 +1089,16 @@ class JSScript : public js::gc::BarrieredCell<JSScript>
|
||||
}
|
||||
|
||||
bool hasIonScript() const {
|
||||
// Note: While a script's baseline script is protected by the
|
||||
// compilation lock, writes to the ion script are not. This helps lock
|
||||
// ordering issues in CodeGenerator::link. Tests of script->ion during
|
||||
// off thread compilation can therefore race, though these are fairly
|
||||
// benign and the IonScript itself is never accessed.
|
||||
js::AutoThreadSafeAccess ts(this);
|
||||
return ion && ion != ION_DISABLED_SCRIPT && ion != ION_COMPILING_SCRIPT;
|
||||
}
|
||||
bool canIonCompile() const {
|
||||
// Note: see above comment.
|
||||
js::AutoThreadSafeAccess ts(this);
|
||||
return ion != ION_DISABLED_SCRIPT;
|
||||
}
|
||||
|
@ -981,10 +981,10 @@ JSRuntime::assertCanLock(RuntimeLock which)
|
||||
JS_ASSERT(exclusiveAccessOwner != PR_GetCurrentThread());
|
||||
case WorkerThreadStateLock:
|
||||
JS_ASSERT_IF(workerThreadState, !workerThreadState->isLocked());
|
||||
case OperationCallbackLock:
|
||||
JS_ASSERT(!currentThreadOwnsOperationCallbackLock());
|
||||
case CompilationLock:
|
||||
JS_ASSERT(compilationLockOwner != PR_GetCurrentThread());
|
||||
case OperationCallbackLock:
|
||||
JS_ASSERT(!currentThreadOwnsOperationCallbackLock());
|
||||
case GCLock:
|
||||
JS_ASSERT(gcLockOwner != PR_GetCurrentThread());
|
||||
break;
|
||||
|
@ -735,8 +735,8 @@ struct JSRuntime : public JS::shadow::Runtime,
|
||||
enum RuntimeLock {
|
||||
ExclusiveAccessLock,
|
||||
WorkerThreadStateLock,
|
||||
OperationCallbackLock,
|
||||
CompilationLock,
|
||||
OperationCallbackLock,
|
||||
GCLock
|
||||
};
|
||||
#ifdef DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user