зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1767829 - Part 1: Give ScriptLoaderInterface caching methods default implementations which do nothing r=yulia
Give the caching interfaces default empty implementations so derived classes don't need to implement them if they don't want any speical behaviour. We don't use these methods for caching in mozJSComponentLoader. Differential Revision: https://phabricator.services.mozilla.com/D145488
This commit is contained in:
Родитель
b58143c665
Коммит
39651f8671
|
@ -74,12 +74,14 @@ class ScriptLoaderInterface : public nsISupports {
|
|||
JS::MutableHandle<JSScript*> aIntroductionScript) = 0;
|
||||
|
||||
virtual void MaybePrepareModuleForBytecodeEncodingBeforeExecute(
|
||||
JSContext* aCx, ModuleLoadRequest* aRequest) = 0;
|
||||
JSContext* aCx, ModuleLoadRequest* aRequest) {}
|
||||
|
||||
virtual nsresult MaybePrepareModuleForBytecodeEncodingAfterExecute(
|
||||
ModuleLoadRequest* aRequest, nsresult aRv) = 0;
|
||||
ModuleLoadRequest* aRequest, nsresult aRv) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual void MaybeTriggerBytecodeEncoding() = 0;
|
||||
virtual void MaybeTriggerBytecodeEncoding() {}
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче