+31
−20
Loading
mWriter is now a reference, and the ownership is optional through a separate member variable that could stay null. User can now choose to keep the JSONWriteFunc on their stack, which saves a heap allocation, and makes it easier to access the concrete JSONWriteFunc implementation directly (instead of through WriteFunc()). Differential Revision: https://phabricator.services.mozilla.com/D154617