зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969868 - Use fallible allocations in some places in our plugin code; r=bsmedberg
It seems like the sizes for these data structures can be controlled from Web content, and we are already prepared to deal with OOM conditions, except that we are using infallible allocations by mistake.
This commit is contained in:
Родитель
29518ba532
Коммит
a5346a9f51
|
@ -657,7 +657,7 @@ PluginScriptableObjectChild::AnswerInvoke(PPluginIdentifierChild* aId,
|
|||
return true;
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
AutoFallibleTArray<NPVariant, 10> convertedArgs;
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
|
@ -727,7 +727,7 @@ PluginScriptableObjectChild::AnswerInvokeDefault(const InfallibleTArray<Variant>
|
|||
return true;
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
AutoFallibleTArray<NPVariant, 10> convertedArgs;
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
|
@ -979,7 +979,7 @@ PluginScriptableObjectChild::AnswerConstruct(const InfallibleTArray<Variant>& aA
|
|||
return true;
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
AutoFallibleTArray<NPVariant, 10> convertedArgs;
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
|
|
|
@ -707,7 +707,7 @@ PluginScriptableObjectParent::AnswerInvoke(PPluginIdentifierParent* aId,
|
|||
return true;
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
AutoFallibleTArray<NPVariant, 10> convertedArgs;
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
|
@ -790,7 +790,7 @@ PluginScriptableObjectParent::AnswerInvokeDefault(const InfallibleTArray<Variant
|
|||
return true;
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
AutoFallibleTArray<NPVariant, 10> convertedArgs;
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
|
@ -1092,7 +1092,7 @@ PluginScriptableObjectParent::AnswerConstruct(const InfallibleTArray<Variant>& a
|
|||
return true;
|
||||
}
|
||||
|
||||
nsAutoTArray<NPVariant, 10> convertedArgs;
|
||||
AutoFallibleTArray<NPVariant, 10> convertedArgs;
|
||||
uint32_t argCount = aArgs.Length();
|
||||
|
||||
if (!convertedArgs.SetLength(argCount)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче