Moved some context stuff to the top to trade a tiny bit of memory (a few pointers) for speed - no need to get the current scene multiple times only because we iterate over multiple objects. An alternative would be to use multiple for loops over the objects, but I would try to avoid that.
In case of a premature cancellation of the operator, i.e. missing RegionView3D, the loop over all objects can be aborted early.
Added call MEM_freeN(objects); before return OPERATOR_CANCELLED; because otherwise we would leak memory, wouldn't we?
Any better way to deal with such situations (RAII, goto)? As long as it's a single call to clean up, it should be fine, but maybe there's some better way...
Existing patches seem to skip (continue;) objects that can't be processed. In 2.7x, the operator would be cancelled for the single active object and an error reported.
Not sure if the error reporting in case of multi-object editing should be somehow ported. Per-object errors don't make sense, so maybe report only if the error occurs for all objects?
Or ignore errors if there's more than a single object, but if (object_len == 1) then re-use the existing code and report error & cancel operator?