Being a composite fuselage, the 787 fuselage has the potential to be MUCH stronger than the 777 fuselage, and hence more able to withstand higher impact forces...it depends on how they used the carbon fiber in making the 787 fuselage.
As to how well the 787 fuselage compares to the 777 fuselage in fire-resistance, I have no idea.