Bug 1538206 - Update comments in MediaKeySystemAccess to reflect current numbering in spec. r=cpearce
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 16 Apr 2019 19:38:46 +0000
changeset 469790 a38b2423065c
parent 469789 75d2b35c092f
child 469791 f7f4cfa92ebf
push id35882
push usercbrindusan@mozilla.com
push dateWed, 17 Apr 2019 15:54:01 +0000
treeherdermozilla-central@37185c0ae520 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1538206
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1538206 - Update comments in MediaKeySystemAccess to reflect current numbering in spec. r=cpearce The spec referenced in the comments in code has been updated since the code was originally written. As such, some of the sections referenced in code comments now have different numbering. Update the comments to reflect this. Differential Revision: https://phabricator.services.mozilla.com/D27726
dom/media/eme/MediaKeySystemAccess.cpp
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -451,17 +451,17 @@ static bool ToSessionType(const nsAStrin
   }
   if (aSessionType.Equals(ToString(MediaKeySessionType::Persistent_license))) {
     aOutType = MediaKeySessionType::Persistent_license;
     return true;
   }
   return false;
 }
 
-// 5.2.1 Is persistent session type?
+// 5.1.1 Is persistent session type?
 static bool IsPersistentSessionType(MediaKeySessionType aSessionType) {
   return aSessionType == MediaKeySessionType::Persistent_license;
 }
 
 CodecType GetMajorType(const MediaMIMEType& aMIMEType) {
   if (aMIMEType.HasAudioMajorType()) {
     return Audio;
   }
@@ -517,17 +517,17 @@ static bool IsParameterUnrecognized(cons
     if (!param.LowerCaseEqualsLiteral("codecs") &&
         !param.LowerCaseEqualsLiteral("profiles")) {
       return true;
     }
   }
   return false;
 }
 
-// 3.1.2.3 Get Supported Capabilities for Audio/Video Type
+// 3.1.1.3 Get Supported Capabilities for Audio/Video Type
 static Sequence<MediaKeySystemMediaCapability> GetSupportedCapabilities(
     const CodecType aCodecType,
     const nsTArray<MediaKeySystemMediaCapability>& aRequestedCapabilities,
     const MediaKeySystemConfiguration& aPartialConfig,
     const KeySystemConfig& aKeySystem, DecoderDoctorDiagnostics* aDiagnostics,
     const std::function<void(const char*)>& aDeprecationLogFn) {
   // Let local accumulated configuration be a local copy of partial
   // configuration. (Note: It's not necessary for us to maintain a local copy,
@@ -802,17 +802,17 @@ static bool CheckRequirement(const Media
 
   // Set the requirement member of accumulated configuration to equal
   // calculated requirement.
   aOutRequirement = requirement;
 
   return true;
 }
 
-// 3.1.2.2, step 12
+// 3.1.1.2, step 12
 // Follow the steps for the first matching condition from the following list:
 // If the sessionTypes member is present in candidate configuration.
 // Let session types be candidate configuration's sessionTypes member.
 // Otherwise let session types be ["temporary"].
 // Note: This returns an empty array on malloc failure.
 static Sequence<nsString> UnboxSessionTypes(
     const Optional<Sequence<nsString>>& aSessionTypes) {
   Sequence<nsString> sessionTypes;
@@ -821,17 +821,17 @@ static Sequence<nsString> UnboxSessionTy
   } else {
     // Note: fallible. Results in an empty array.
     sessionTypes.AppendElement(ToString(MediaKeySessionType::Temporary),
                                mozilla::fallible);
   }
   return sessionTypes;
 }
 
-// 3.1.2.2 Get Supported Configuration and Consent
+// 3.1.1.2 Get Supported Configuration and Consent
 static bool GetSupportedConfig(
     const KeySystemConfig& aKeySystem,
     const MediaKeySystemConfiguration& aCandidate,
     MediaKeySystemConfiguration& aOutConfig,
     DecoderDoctorDiagnostics* aDiagnostics, bool aInPrivateBrowsing,
     const std::function<void(const char*)>& aDeprecationLogFn) {
   // Let accumulated configuration be a new MediaKeySystemConfiguration
   // dictionary.