Bug 1074961 - Use C++ to guarantee that the empty chunk set is only accessed locked; r=sfink

--HG--
extra : rebase_source : 8b401fde6e6f9ff35cfa01d2692422f3e18039e1