8. Given the function $f(x)=x^{2}+a x+b, a, b \in \mathbf{R}$, let $M(a, b)$ be the maximum value of $|f(x)|$ on the interval $[-1,1]$. When $a, b$ satisfy $M(a, b) \leqslant 2$, the maximum value of $|a|+|b|$ is $\qquad$ .
According to the problem, $\left\{\begin{array}{l}|1+a+b| \leqslant 2, \\ |1-a+b| \leqslant 2\end{array} \Rightarrow\left\{\begin{array}{l}|a+b| \leqslant 3, \\ |a-b| \leqslant 3\end{array} \Rightarrow|a|+|b| \leqslant 3\right.\right.$.
On the other hand, taking $f(x)=(x+1)^{2}-2=x^{2}+2 x-1$ satisfies the problem. Therefore, the maximum value of $|a|+|b|$ is 3.