mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1313028 - GCC 6 null pointer check removal causes segfaulting in ActionResultHolder::GetValueAndDelete(). r=chmanchester.
This commit is contained in:
parent
9189e00cd2
commit
1484a2b876
@ -1354,6 +1354,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
|
||||
template <>
|
||||
class ActionResultHolder<void> : public UntypedActionResultHolderBase {
|
||||
public:
|
||||
explicit ActionResultHolder() {}
|
||||
|
||||
void GetValueAndDelete() const { delete this; }
|
||||
|
||||
virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
|
||||
@ -1365,7 +1367,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
|
||||
const typename Function<F>::ArgumentTuple& args,
|
||||
const string& call_description) {
|
||||
func_mocker->PerformDefaultAction(args, call_description);
|
||||
return NULL;
|
||||
return new ActionResultHolder();
|
||||
}
|
||||
|
||||
// Performs the given action and returns NULL.
|
||||
@ -1374,7 +1376,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
|
||||
const Action<F>& action,
|
||||
const typename Function<F>::ArgumentTuple& args) {
|
||||
action.Perform(args);
|
||||
return NULL;
|
||||
return new ActionResultHolder();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user