mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164564 - WorkerDebugger.initialize should not return failure when called more than once;r=khuey
This commit is contained in:
parent
027ecf2f1f
commit
3a3005f6b5
@ -4370,17 +4370,19 @@ WorkerDebugger::Initialize(const nsAString& aURL, JSContext* aCx)
|
||||
|
||||
MutexAutoLock lock(mMutex);
|
||||
|
||||
if (!mWorkerPrivate || mIsInitialized) {
|
||||
if (!mWorkerPrivate) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsRefPtr<CompileDebuggerScriptRunnable> runnable =
|
||||
new CompileDebuggerScriptRunnable(mWorkerPrivate, aURL);
|
||||
if (!runnable->Dispatch(aCx)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
if (!mIsInitialized) {
|
||||
nsRefPtr<CompileDebuggerScriptRunnable> runnable =
|
||||
new CompileDebuggerScriptRunnable(mWorkerPrivate, aURL);
|
||||
if (!runnable->Dispatch(aCx)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mIsInitialized = true;
|
||||
mIsInitialized = true;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user