This scoped object currently calls the same conditional twice:
"""
AllocationContextTracker::capture_mode() !=
AllocationContextTracker::CaptureMode::DISABLED
"""
and relies on the assumption that this conditional will evaluate to the same thing in both cases. This is currently true because capture_mode is set at startup, but I expect this to be false in the not-too-distant future, and all the subtle:: code surrounding capture_mode_ sure makes it sound like it might change at any point in time.
Instead, the result of the conditional should be cached and we should use the cached value in place of evaluting teh conditional agian. This guarantees that there are an equal number of begin_ignore_scope and end_ignore_scope called.
Comment 1 by primiano@chromium.org
, Apr 27 2017