Make backtrace args array a vec
Summary:
A backtrace array is a list (varray) of frames (darrays). As a result, when we access these arrays through reflection, etc., we mark them to depth 2, so that we can serialize or otherwise observe these dvarrays in the result.
However, there is actually one dvarray at depth 3 that we should have marked: the args array. This array is provided on a best-effort basis: there's no guarantee that we have it, and in fact, in our typical production configuration, we don't have it. (Being able to optimize away locals completely is important!) This array is being observed in sandbox mode.
One fix to this problem is to mark backtraces to depth 3. However, that's not quite right, because there is other data (e.g. frame metadata) at depth 3 that we don't want to mark, because it may be a Hack array. Instead, I propose that we just convert the args array to a vec right now. This change should only affect sandbox mode; code already can't rely on the array's presence, so I think it's okay to make this change before the rest of unification.
Reviewed By: ricklavoie, dneiter
Differential Revision:
D26052419
fbshipit-source-id:
9732998726f71953e86e0ccdc1f29c8215bee8b6