susia77 / pdfium

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

pdfium should not contain try/catch blocks #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All of chromium builds with exceptions disabled, except for the pdfium targets. 
The try/catch blocks don't seem to do much, and there are no throw statements 
anywhere. The only thing I could think of they're good for is to protect 
against operator new throwing on OOM, but new is called in a few places without 
try/catch too, and the chromium allocator kills the process on OOM instead of 
throwing anyways.

pdfium shouldn't use try/catch. There aren't many of these blocks anyways.

Original issue reported on code.google.com by thakis@chromium.org on 24 Jul 2014 at 11:22

GoogleCodeExporter commented 9 years ago

Original comment by bo...@foxitsoftware.com on 30 Jul 2014 at 5:14

GoogleCodeExporter commented 9 years ago
Any progress to report?

Original comment by thakis@chromium.org on 7 Aug 2014 at 6:21

GoogleCodeExporter commented 9 years ago
Let me check the developer, will get back to this one asap.

Original comment by bo...@foxitsoftware.com on 11 Aug 2014 at 4:43

GoogleCodeExporter commented 9 years ago
Nico, I have confirmed that we can remove the try/catch block. Shall I prepare 
the patch?

Original comment by bo...@foxitsoftware.com on 13 Aug 2014 at 4:30

GoogleCodeExporter commented 9 years ago
That'd be great :-)

Original comment by thakis@chromium.org on 13 Aug 2014 at 4:34

GoogleCodeExporter commented 9 years ago
Fixed in 
https://pdfium.googlesource.com/pdfium/+/d4e406e254b5a60e58ff2fcc12b59bef7e436e7
4

Original comment by bo...@foxitsoftware.com on 13 Aug 2014 at 6:04

GoogleCodeExporter commented 9 years ago
Yay!

Original comment by scottmg@chromium.org on 13 Aug 2014 at 6:08