Restore error state before invoking debugger hook.
Summary:
If we hit the debugger hook while handling an error and then hit another error
via raise_error, ExecutionContext::handleError might return. This is because the
error state within the context might have been set to ErrorRaised (or ErrorRaisedByUserHandler) by the previous error.
I've changed the scope of the ErrorStateHelper object to be smaller so that the
previous state is restored before we hit the debugger hooks.
Reviewed By: markw65
Differential Revision:
D4069779
fbshipit-source-id:
09e9b88879286c4ad869241dc25dc5c9da4c66af