зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631346 - Fix a null ptr crash in PerformanceObserver::Observe r=baku
Differential Revision: https://phabricator.services.mozilla.com/D76193
This commit is contained in:
Родитель
7ac7aeb879
Коммит
4b4bf8886f
|
@ -161,6 +161,11 @@ void PerformanceObserver::Observe(const PerformanceObserverInit& aOptions,
|
|||
const Optional<nsString>& maybeType = aOptions.mType;
|
||||
const Optional<bool>& maybeBuffered = aOptions.mBuffered;
|
||||
|
||||
if (!mPerformance) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!maybeEntryTypes.WasPassed() && !maybeType.WasPassed()) {
|
||||
/* Per spec (3.3.1.2), this should be a syntax error. */
|
||||
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
|
||||
|
|
Загрузка…
Ссылка в новой задаче