Do you notice how, compared to the previous page, the narrator in this snippet seems a bit more 'stepped back' from Peter? The narrator can see inside him, but isn't necessarily planted inside his stream of consciousness.
Let's look at those phrases and figure out whose opinion is in each one.
"He knew well that sudden death might be at the next tree"
Who judged that death might be sudden? (And at the next tree?)
Peter did. The narrator tells us that is what Peter thought: "He knew well that sudden death might be at the next tree."
"He swore this terrible oath"
Peter swears an oath: "Hook or me this time." But who decides the oath is terrible?
It's not Peter, it's the narrator. The word 'terrible' expresses the gravity of the oath, but it's the narrator's choice.
That said, would Peter be surprised or disagree with this choice? Probably not!
"He was frightfully happy"
Who decides that Peter is frightfully happy?
It's not Peter. He doesn't say that or think it.
Instead he's crouched in the darkness with his knife, and the narrator tells us that Peter is frightfully happy—a description which captures a particular combination of danger and joy.
We have no reason to believe the narrator is wrong about this; the narrator knows more about Peter than we do. But it's still the narrator's opinion.