Title: [172287] trunk/Source/WebCore
Revision
172287
Author
[email protected]
Date
2014-08-07 15:17:50 -0700 (Thu, 07 Aug 2014)

Log Message

[EME][Mac] Error codes returned by AVSampleBufferDisplayLayer are negative; clip when passed to _javascript_ as doubles.
https://bugs.webkit.org/show_bug.cgi?id=135710

Reviewed by Brent Fulgham.

Return the absolute value of the error codes returned by AVSampleBufferDisplayLayer, so that the conversion from
unsigned -> double does not clip due to the (converted) value being greater than 2^53.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172286 => 172287)


--- trunk/Source/WebCore/ChangeLog	2014-08-07 22:16:30 UTC (rev 172286)
+++ trunk/Source/WebCore/ChangeLog	2014-08-07 22:17:50 UTC (rev 172287)
@@ -1,3 +1,17 @@
+2014-08-07  Jer Noble  <[email protected]>
+
+        [EME][Mac] Error codes returned by AVSampleBufferDisplayLayer are negative; clip when passed to _javascript_ as doubles.
+        https://bugs.webkit.org/show_bug.cgi?id=135710
+
+        Reviewed by Brent Fulgham.
+
+        Return the absolute value of the error codes returned by AVSampleBufferDisplayLayer, so that the conversion from
+        unsigned -> double does not clip due to the (converted) value being greater than 2^53.
+
+        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+        (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
+        (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
+
 2014-08-07  Daniel Bates  <[email protected]>
 
         Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (172286 => 172287)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm	2014-08-07 22:16:30 UTC (rev 172286)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm	2014-08-07 22:17:50 UTC (rev 172287)
@@ -150,7 +150,7 @@
     if (!m_client)
         return;
 
-    m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, [error code]);
+    m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs([error code]));
 }
 
 void CDMSessionMediaSourceAVFObjC::rendererDidReceiveError(AVSampleBufferAudioRenderer *, NSError *error)
@@ -158,7 +158,7 @@
     if (!m_client)
         return;
 
-    m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, [error code]);
+    m_client->sendError(CDMSessionClient::MediaKeyErrorDomain, abs([error code]));
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to