Restore error state before invoking debugger hook.
commit7ea91d663876ad9e4b77115006c484997a666ed0
authorBill Nell <bnell@fb.com>
Tue, 25 Oct 2016 22:54:56 +0000 (25 15:54 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Tue, 25 Oct 2016 23:05:52 +0000 (25 16:05 -0700)
treef78353195daed4572f65ffecd2a3fb5810a30513
parent571fd5188a7e106d25c765fc4d8eeaae38284600
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
hphp/runtime/base/execution-context.cpp
hphp/test/quick/debugger/break6.php [new file with mode: 0644]
hphp/test/quick/debugger/break6.php.expectf [new file with mode: 0644]
hphp/test/quick/debugger/break6.php.in [new file with mode: 0644]