Bug 1358399. P1 - move "elem.crossOrigin = test.crossOrigin || false" from SetupEME() to LoadTest() to improve cohesion. r=gerald

The attributes are used by MaybeCrossOriginURI() which is called by LoadTest() indirectly.

MozReview-Commit-ID: LH2STpONuCE

--HG--
extra : rebase_source : 5762de80943d30064df0d4a69ebe7d36a12f308b
extra : intermediate-source : 73e455a974c9bc3609b72d3ffbbcbc6f1077f62b
extra : source : 7802185d9bcaec4f7377de94e4876d995a8ab019
This commit is contained in:
JW Wang 2017-04-21 14:29:25 +08:00
Родитель bfb79c0f40
Коммит c351b765ff
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -239,6 +239,7 @@ function LoadTest(test, elem, token, loadParams)
var ms = new MediaSource();
elem.src = URL.createObjectURL(ms);
elem.crossOrigin = test.crossOrigin || false;
return new Promise(function (resolve, reject) {
ms.addEventListener("sourceopen", function () {
@ -282,7 +283,6 @@ function EMEPromiseAll(v, token, promises) {
function SetupEME(test, token, params)
{
var v = document.createElement("video");
v.crossOrigin = test.crossOrigin || false;
v.sessions = [];
v.closeSessions = function() {