Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void HRTFDatabase::getKernelsFromAzimuthElevation(double azimuthBlend, 85 void HRTFDatabase::getKernelsFromAzimuthElevation(double azimuthBlend,
86 unsigned azimuthIndex, 86 unsigned azimuthIndex,
87 double elevationAngle, 87 double elevationAngle,
88 HRTFKernel*& kernelL, 88 HRTFKernel*& kernelL,
89 HRTFKernel*& kernelR, 89 HRTFKernel*& kernelR,
90 double& frameDelayL, 90 double& frameDelayL,
91 double& frameDelayR) { 91 double& frameDelayR) {
92 unsigned elevationIndex = indexFromElevationAngle(elevationAngle); 92 unsigned elevationIndex = indexFromElevationAngle(elevationAngle);
93 ASSERT_WITH_SECURITY_IMPLICATION(elevationIndex < m_elevations.size() && 93 SECURITY_DCHECK(elevationIndex < m_elevations.size() &&
94 m_elevations.size() > 0); 94 m_elevations.size() > 0);
95 95
96 if (!m_elevations.size()) { 96 if (!m_elevations.size()) {
97 kernelL = 0; 97 kernelL = 0;
98 kernelR = 0; 98 kernelR = 0;
99 return; 99 return;
100 } 100 }
101 101
102 if (elevationIndex > m_elevations.size() - 1) 102 if (elevationIndex > m_elevations.size() - 1)
103 elevationIndex = m_elevations.size() - 1; 103 elevationIndex = m_elevations.size() - 1;
104 104
(...skipping 14 matching lines...) Expand all
119 elevationAngle = 119 elevationAngle =
120 clampTo<double, double>(elevationAngle, MinElevation, MaxElevation); 120 clampTo<double, double>(elevationAngle, MinElevation, MaxElevation);
121 121
122 unsigned elevationIndex = 122 unsigned elevationIndex =
123 static_cast<int>(InterpolationFactor * (elevationAngle - MinElevation) / 123 static_cast<int>(InterpolationFactor * (elevationAngle - MinElevation) /
124 RawElevationAngleSpacing); 124 RawElevationAngleSpacing);
125 return elevationIndex; 125 return elevationIndex;
126 } 126 }
127 127
128 } // namespace blink 128 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/audio/AudioFIFO.cpp ('k') | third_party/WebKit/Source/platform/fonts/GlyphBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698