mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1008338 - Add WorkerScriptExecutedSuccessfully(). r=bent
This commit is contained in:
parent
46913d3906
commit
b2949dbebd
@ -879,7 +879,11 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSAutoCompartment ac(aCx, global);
|
JSAutoCompartment ac(aCx, global);
|
||||||
return scriptloader::LoadWorkerScript(aCx);
|
bool result = scriptloader::LoadWorkerScript(aCx);
|
||||||
|
if (result) {
|
||||||
|
aWorkerPrivate->SetWorkerScriptExecutedSuccessfully();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3558,7 +3562,8 @@ WorkerPrivate::WorkerPrivate(JSContext* aCx,
|
|||||||
mRunningExpiredTimeouts(false), mCloseHandlerStarted(false),
|
mRunningExpiredTimeouts(false), mCloseHandlerStarted(false),
|
||||||
mCloseHandlerFinished(false), mMemoryReporterRunning(false),
|
mCloseHandlerFinished(false), mMemoryReporterRunning(false),
|
||||||
mBlockedForMemoryReporter(false), mCancelAllPendingRunnables(false),
|
mBlockedForMemoryReporter(false), mCancelAllPendingRunnables(false),
|
||||||
mPeriodicGCTimerRunning(false), mIdleGCTimerRunning(false)
|
mPeriodicGCTimerRunning(false), mIdleGCTimerRunning(false),
|
||||||
|
mWorkerScriptExecutedSuccessfully(false)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
, mPRThread(nullptr)
|
, mPRThread(nullptr)
|
||||||
#endif
|
#endif
|
||||||
|
@ -785,6 +785,7 @@ class WorkerPrivate : public WorkerPrivateParent<WorkerPrivate>
|
|||||||
bool mCancelAllPendingRunnables;
|
bool mCancelAllPendingRunnables;
|
||||||
bool mPeriodicGCTimerRunning;
|
bool mPeriodicGCTimerRunning;
|
||||||
bool mIdleGCTimerRunning;
|
bool mIdleGCTimerRunning;
|
||||||
|
bool mWorkerScriptExecutedSuccessfully;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
PRThread* mPRThread;
|
PRThread* mPRThread;
|
||||||
@ -1068,6 +1069,23 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
SetWorkerScriptExecutedSuccessfully()
|
||||||
|
{
|
||||||
|
AssertIsOnWorkerThread();
|
||||||
|
// Should only be called once!
|
||||||
|
MOZ_ASSERT(!mWorkerScriptExecutedSuccessfully);
|
||||||
|
mWorkerScriptExecutedSuccessfully = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only valid after CompileScriptRunnable has finished running!
|
||||||
|
bool
|
||||||
|
WorkerScriptExecutedSuccessfully() const
|
||||||
|
{
|
||||||
|
AssertIsOnWorkerThread();
|
||||||
|
return mWorkerScriptExecutedSuccessfully;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WorkerPrivate(JSContext* aCx, WorkerPrivate* aParent,
|
WorkerPrivate(JSContext* aCx, WorkerPrivate* aParent,
|
||||||
const nsAString& aScriptURL, bool aIsChromeWorker,
|
const nsAString& aScriptURL, bool aIsChromeWorker,
|
||||||
|
Loading…
Reference in New Issue
Block a user