Kill CFX_Object.
authorTom Sepez <tsepez@chromium.org>
Tue, 14 Apr 2015 19:54:38 +0000 (12:54 -0700)
committerTom Sepez <tsepez@chromium.org>
Tue, 14 Apr 2015 19:54:38 +0000 (12:54 -0700)
commit4926900ab54a493d236291b5a24dfa4476792182
treee53800a0569300516c934bfccbb036ce39d98cb3
parenteddab4425614e49146f904f00da4a664ba4b581b
Kill CFX_Object.

CFX_Object is a type that implements its own new operators that return
NULL on error. There's no need for this given the |new (std::nothrow)|
syntax; in fact, the current code can only work if there is no activity
in the constructors.  This may explain the pervasive lack of
constructors and reliance on Init() methods throughout the codebase.

The activity takes place in fx_memory.h, where FX_NEW is mapped onto
the std::nothrow syntax.  The rest is just cleanup.

Down the road, we will simply throw and remove all the error-checking
paths for new objects. Landing this patch first will at least show a
simple path back to the old behaviour without having to re-introduce
CFX_Object should someone want to do so in their own fork.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1088733002
86 files changed:
core/include/fpdfapi/fpdf_module.h
core/include/fpdfapi/fpdf_objects.h
core/include/fpdfapi/fpdf_page.h
core/include/fpdfapi/fpdf_pageobj.h
core/include/fpdfapi/fpdf_parser.h
core/include/fpdfapi/fpdf_render.h
core/include/fpdfapi/fpdf_resource.h
core/include/fpdfapi/fpdf_serial.h
core/include/fpdfdoc/fpdf_doc.h
core/include/fpdfdoc/fpdf_tagged.h
core/include/fpdfdoc/fpdf_vt.h
core/include/fpdftext/fpdf_text.h
core/include/fxcodec/fx_codec.h
core/include/fxcrt/fx_basic.h
core/include/fxcrt/fx_coordinates.h
core/include/fxcrt/fx_memory.h
core/include/fxcrt/fx_string.h
core/include/fxcrt/fx_xml.h
core/include/fxge/fx_dib.h
core/include/fxge/fx_font.h
core/include/fxge/fx_ge.h
core/src/fpdfapi/fpdf_edit/editint.h
core/src/fpdfapi/fpdf_font/font_int.h
core/src/fpdfapi/fpdf_font/fpdf_font.cpp
core/src/fpdfapi/fpdf_font/ttgsubtable.h
core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
core/src/fpdfapi/fpdf_page/pageint.h
core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
core/src/fpdfapi/fpdf_render/render_int.h
core/src/fpdfdoc/doc_form.cpp
core/src/fpdfdoc/pdf_vt.h
core/src/fpdftext/fpdf_text_search.cpp
core/src/fpdftext/text_int.h
core/src/fpdftext/txtproc.h
core/src/fxcodec/codec/codec_int.h
core/src/fxcodec/codec/fx_codec_fax.cpp
core/src/fxcodec/codec/fx_codec_flate.cpp
core/src/fxcodec/codec/fx_codec_icc.cpp
core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
core/src/fxcrt/extension.h
core/src/fxcrt/fx_arabic.h
core/src/fxcrt/fx_basic_util.cpp
core/src/fxcrt/fxcrt_platforms.h
core/src/fxcrt/fxcrt_posix.h
core/src/fxcrt/fxcrt_windows.h
core/src/fxcrt/xml_int.h
core/src/fxge/agg/agg23/agg_array.h
core/src/fxge/agg/agg23/agg_basics.h
core/src/fxge/agg/agg23/agg_conv_adaptor_vcgen.h
core/src/fxge/agg/agg23/agg_curves.h
core/src/fxge/agg/agg23/agg_path_storage.h
core/src/fxge/agg/agg23/agg_pixfmt_gray.h
core/src/fxge/agg/agg23/agg_rasterizer_scanline_aa.h
core/src/fxge/agg/agg23/agg_renderer_base.h
core/src/fxge/agg/agg23/agg_renderer_scanline.h
core/src/fxge/agg/agg23/agg_rendering_buffer.h
core/src/fxge/agg/agg23/agg_scanline_u.h
core/src/fxge/agg/agg23/agg_vcgen_dash.h
core/src/fxge/agg/agg23/agg_vcgen_stroke.h
core/src/fxge/agg/agg23/agg_vertex_sequence.h
core/src/fxge/agg/agg23/fx_agg_driver.cpp
core/src/fxge/agg/include/fx_agg_driver.h
core/src/fxge/android/fpf_skiafont.h
core/src/fxge/android/fpf_skiafontmgr.h
core/src/fxge/android/fpf_skiamodule.h
core/src/fxge/apple/apple_int.h
core/src/fxge/dib/dib_int.h
core/src/fxge/dib/fx_dib_convert.cpp
core/src/fxge/ge/fx_ge_ps.cpp
core/src/fxge/ge/text_int.h
core/src/fxge/skia/fx_skia_blitter_new.h
core/src/fxge/skia/fx_skia_device.cpp
core/src/fxge/win32/fx_win32_dwrite.cpp
core/src/fxge/win32/fx_win32_gdipext.cpp
core/src/fxge/win32/win32_int.h
core/src/reflow/autoreflow.h
core/src/reflow/layoutprovider_taggedpdf.h
core/src/reflow/reflowedpage.h
fpdfsdk/include/fsdk_baseannot.h
fpdfsdk/include/fsdk_define.h
fpdfsdk/include/fsdk_rendercontext.h
fpdfsdk/include/javascript/JS_Object.h
fpdfsdk/src/fpdf_dataavail.cpp
fpdfsdk/src/fpdfview.cpp
fpdfsdk/src/jsapi/fxjs_v8.cpp