зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1574972 - Make nsJSUtils::GetCallingLocation() fallible. r=smaug
Some German web sites seem to have started to have file names with hundreds of thousands of bytes long, which is causing OOM crashes on Android. Differential Revision: https://phabricator.services.mozilla.com/D42674 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
acbd6a2b96
Коммит
c0db818712
|
@ -49,8 +49,7 @@ bool nsJSUtils::GetCallingLocation(JSContext* aContext, nsACString& aFilename,
|
|||
return false;
|
||||
}
|
||||
|
||||
aFilename.Assign(filename.get());
|
||||
return true;
|
||||
return aFilename.Assign(filename.get(), fallible);
|
||||
}
|
||||
|
||||
bool nsJSUtils::GetCallingLocation(JSContext* aContext, nsAString& aFilename,
|
||||
|
@ -60,8 +59,7 @@ bool nsJSUtils::GetCallingLocation(JSContext* aContext, nsAString& aFilename,
|
|||
return false;
|
||||
}
|
||||
|
||||
aFilename.Assign(NS_ConvertUTF8toUTF16(filename.get()));
|
||||
return true;
|
||||
return aFilename.Assign(NS_ConvertUTF8toUTF16(filename.get()), fallible);
|
||||
}
|
||||
|
||||
uint64_t nsJSUtils::GetCurrentlyRunningCodeInnerWindowID(JSContext* aContext) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче