Bug 1813494 - Part 3: Add more cancellation checks and state assertions to module load requests r=smaug
We should check for previous cancellation on all path where a module load request's state can be changed by an asynchronous action. Also add assertions about the expected previous state where possible. Differential Revision: https://phabricator.services.mozilla.com/D168233
This commit is contained in:
@@ -209,8 +209,8 @@ class ScriptLoadRequest
|
||||
};
|
||||
|
||||
bool IsFetching() const { return mState == State::Fetching; }
|
||||
|
||||
bool IsCompiling() const { return mState == State::Compiling; }
|
||||
bool IsLoadingImports() const { return mState == State::LoadingImports; }
|
||||
|
||||
bool IsReadyToRun() const {
|
||||
return mState == State::Ready || mState == State::Canceled;
|
||||
|
||||
Reference in New Issue
Block a user