I don't know how GetDeviceCaps(..., LOGPIXELSY) can return 0, but I guess
there's no harm in bandaiding to just default to 96 in that case.
OK, per Carlos, this is likely due to GetDC() returning NULL, which is in
turn likely due to GDI handle exhaustion or similar.
In this case Chrome is going to behave really badly and the best thing for
the user is just going to be to force a browser crash. The current code
already does that (by accident), but we can make things clearer by
CHECK()ing the result of GetDC().