Use isProgram method to detect Program events

The method allows to avoid direct access to implementation specific RecordType enum.

BUG=361045
R=loislo@chromium.org

Review URL: https://codereview.chromium.org/342473003

git-svn-id: svn://svn.chromium.org/blink/trunk@176314 bbb929c8-8fbe-4397-9dbb-9b2b20218538