zhujingguang / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

Consider completely deleting scary code guarded by IsSafeMode(cc) #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Since IsSafeMode(cc) appears to be always true for pdfium, i.e.

FX_BOOL CJS_EmbedObj::IsSafeMode(IFXJS_Context* cc)
{
    ASSERT(cc != NULL);

    return TRUE;
}

There is a lot of unreachable code that can be removed.  Some of this does some 
pretty scary stuff, so removing it outright will prevent a botch down the road 
(like a blown merge that deletes the safe mode check) from opening a hole.

Original issue reported on code.google.com by tsepez@chromium.org on 16 Aug 2014 at 12:10