Skip to content

Commit

Permalink
Apply automatic range checks to PP_DeviceType_Dev
Browse files Browse the repository at this point in the history
This is part of a long-running background task to remove the remaining uses
of the unchecked IPC_ENUM_TRAITS() macro.

Bug: 246708
Change-Id: Id11af3208efa2fba36333e87aacb5c8eb111b3df
Reviewed-on: https://chromium-review.googlesource.com/677067
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#509508}
  • Loading branch information
Rob Buis authored and Commit Bot committed Oct 17, 2017
1 parent 0137a99 commit c30aef4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions native_client_sdk/src/libraries/ppapi/library.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
'FILES': [
'deprecated_bool.h',
'ppb_cursor_control_dev.h',
'ppb_device_ref_dev.h',
'ppb_file_chooser_dev.h',
'ppb_memory_dev.h',
'ppb_opengles2ext_dev.h',
Expand Down
3 changes: 2 additions & 1 deletion ppapi/api/dev/ppb_device_ref_dev.idl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ enum PP_DeviceType_Dev {
PP_DEVICETYPE_DEV_INVALID = 0,
PP_DEVICETYPE_DEV_AUDIOCAPTURE = 1,
PP_DEVICETYPE_DEV_VIDEOCAPTURE = 2,
PP_DEVICETYPE_DEV_AUDIOOUTPUT = 3
PP_DEVICETYPE_DEV_AUDIOOUTPUT = 3,
PP_DEVICETYPE_DEV_MAX = PP_DEVICETYPE_DEV_AUDIOOUTPUT
};

interface PPB_DeviceRef_Dev {
Expand Down
3 changes: 2 additions & 1 deletion ppapi/c/dev/ppb_device_ref_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ typedef enum {
PP_DEVICETYPE_DEV_INVALID = 0,
PP_DEVICETYPE_DEV_AUDIOCAPTURE = 1,
PP_DEVICETYPE_DEV_VIDEOCAPTURE = 2,
PP_DEVICETYPE_DEV_AUDIOOUTPUT = 3
PP_DEVICETYPE_DEV_AUDIOOUTPUT = 3,
PP_DEVICETYPE_DEV_MAX = PP_DEVICETYPE_DEV_AUDIOOUTPUT
} PP_DeviceType_Dev;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_DeviceType_Dev, 4);
/**
Expand Down
2 changes: 1 addition & 1 deletion ppapi/proxy/ppapi_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ IPC_ENUM_TRAITS_MAX_VALUE(PP_BlendMode, PP_BLENDMODE_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmExceptionCode, PP_CDMEXCEPTIONCODE_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmKeyStatus, PP_CDMKEYSTATUS_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(PP_CdmMessageType, PP_CDMMESSAGETYPE_MAX)
IPC_ENUM_TRAITS(PP_DeviceType_Dev)
IPC_ENUM_TRAITS_MAX_VALUE(PP_DeviceType_Dev, PP_DEVICETYPE_DEV_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(PP_DecryptorStreamType, PP_DECRYPTORSTREAMTYPE_MAX)
IPC_ENUM_TRAITS_MAX_VALUE(PP_FileSystemType, PP_FILESYSTEMTYPE_ISOLATED)
IPC_ENUM_TRAITS_MAX_VALUE(PP_FileType, PP_FILETYPE_OTHER)
Expand Down

0 comments on commit c30aef4

Please sign in to comment.