mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1148382 - Update Shumway to version 0.10.312. r=till
This commit is contained in:
parent
1db7dacec6
commit
72e957fa1f
@ -162,6 +162,15 @@ var ShumwayCom = {
|
|||||||
environment.swfUrl, environment.privateBrowsing);
|
environment.swfUrl, environment.privateBrowsing);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getWeakMapKeys: function (weakMap) {
|
||||||
|
var keys = Components.utils.nondeterministicGetWeakMapKeys(weakMap);
|
||||||
|
var result = new content.Array();
|
||||||
|
keys.forEach(function (key) {
|
||||||
|
result.push(key);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
setLoadFileCallback: function (callback) {
|
setLoadFileCallback: function (callback) {
|
||||||
onLoadFileCallback = callback;
|
onLoadFileCallback = callback;
|
||||||
},
|
},
|
||||||
|
@ -98,6 +98,10 @@ var ShumwayBootstrapUtils = {
|
|||||||
isRegistered: false,
|
isRegistered: false,
|
||||||
|
|
||||||
register: function () {
|
register: function () {
|
||||||
|
if (this.isRegistered) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.isRegistered = true;
|
this.isRegistered = true;
|
||||||
|
|
||||||
// Register the components.
|
// Register the components.
|
||||||
@ -121,6 +125,10 @@ var ShumwayBootstrapUtils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
unregister: function () {
|
unregister: function () {
|
||||||
|
if (!this.isRegistered) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.isRegistered = false;
|
this.isRegistered = false;
|
||||||
|
|
||||||
// Remove the contract/component.
|
// Remove the contract/component.
|
||||||
|
@ -392,21 +392,19 @@ ShumwayStreamConverterBase.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!url) { // at this point url shall be known -- asserting
|
baseUrl = pageUrl;
|
||||||
throw new Error('Movie url is not specified');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (objectParams.base) {
|
if (objectParams.base) {
|
||||||
baseUrl = Services.io.newURI(objectParams.base, null, pageUrl).spec;
|
try {
|
||||||
} else {
|
var parsedPageUrl = Services.io.newURI(pageUrl);
|
||||||
baseUrl = pageUrl;
|
baseUrl = Services.io.newURI(objectParams.base, null, parsedPageUrl).spec;
|
||||||
|
} catch (e) { /* ignore */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
var movieParams = {};
|
var movieParams = {};
|
||||||
if (objectParams.flashvars) {
|
if (objectParams.flashvars) {
|
||||||
movieParams = parseQueryString(objectParams.flashvars);
|
movieParams = parseQueryString(objectParams.flashvars);
|
||||||
}
|
}
|
||||||
var queryStringMatch = /\?([^#]+)/.exec(url);
|
var queryStringMatch = url && /\?([^#]+)/.exec(url);
|
||||||
if (queryStringMatch) {
|
if (queryStringMatch) {
|
||||||
var queryStringParams = parseQueryString(queryStringMatch[1]);
|
var queryStringParams = parseQueryString(queryStringMatch[1]);
|
||||||
for (var i in queryStringParams) {
|
for (var i in queryStringParams) {
|
||||||
@ -416,7 +414,8 @@ ShumwayStreamConverterBase.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var allowScriptAccess = isScriptAllowed(objectParams.allowscriptaccess, url, pageUrl);
|
var allowScriptAccess = !!url &&
|
||||||
|
isScriptAllowed(objectParams.allowscriptaccess, url, pageUrl);
|
||||||
|
|
||||||
var startupInfo = {};
|
var startupInfo = {};
|
||||||
startupInfo.window = window;
|
startupInfo.window = window;
|
||||||
@ -494,6 +493,18 @@ ShumwayStreamConverterBase.prototype = {
|
|||||||
var domWindow = getDOMWindow(channel);
|
var domWindow = getDOMWindow(channel);
|
||||||
let startupInfo = converter.getStartupInfo(domWindow,
|
let startupInfo = converter.getStartupInfo(domWindow,
|
||||||
converter.getUrlHint(originalURI));
|
converter.getUrlHint(originalURI));
|
||||||
|
|
||||||
|
listener.onStopRequest(aRequest, context, statusCode);
|
||||||
|
|
||||||
|
if (!startupInfo.url) {
|
||||||
|
// Special case when movie URL is not specified, e.g. swfobject
|
||||||
|
// checks only version. No need to instantiate the flash plugin.
|
||||||
|
if (startupInfo.embedTag) {
|
||||||
|
setupSimpleExternalInterface(startupInfo.embedTag);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isShumwayEnabledFor(startupInfo)) {
|
if (!isShumwayEnabledFor(startupInfo)) {
|
||||||
fallbackToNativePlugin(domWindow, false, true);
|
fallbackToNativePlugin(domWindow, false, true);
|
||||||
return;
|
return;
|
||||||
@ -515,8 +526,6 @@ ShumwayStreamConverterBase.prototype = {
|
|||||||
ActivationQueue.enqueue(startupInfo, function(domWindow) {
|
ActivationQueue.enqueue(startupInfo, function(domWindow) {
|
||||||
activateShumwayScripts(domWindow);
|
activateShumwayScripts(domWindow);
|
||||||
}.bind(null, domWindow));
|
}.bind(null, domWindow));
|
||||||
|
|
||||||
listener.onStopRequest(aRequest, context, statusCode);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -539,6 +548,18 @@ ShumwayStreamConverterBase.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function setupSimpleExternalInterface(embedTag) {
|
||||||
|
Components.utils.exportFunction(function (variable) {
|
||||||
|
switch (variable) {
|
||||||
|
case '$version':
|
||||||
|
return 'SHUMWAY 10,0,0';
|
||||||
|
default:
|
||||||
|
log('GetVariable: ' + variable);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}, embedTag.wrappedJSObject, {defineAs: 'GetVariable'});
|
||||||
|
}
|
||||||
|
|
||||||
function isScriptAllowed(allowScriptAccessParameter, url, pageUrl) {
|
function isScriptAllowed(allowScriptAccessParameter, url, pageUrl) {
|
||||||
if (!allowScriptAccessParameter) {
|
if (!allowScriptAccessParameter) {
|
||||||
allowScriptAccessParameter = 'sameDomain';
|
allowScriptAccessParameter = 'sameDomain';
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,2 @@
|
|||||||
0.10.268
|
0.10.312
|
||||||
02fd13d
|
9de7c7a
|
||||||
|
Loading…
Reference in New Issue
Block a user