mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +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);
|
||||
},
|
||||
|
||||
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) {
|
||||
onLoadFileCallback = callback;
|
||||
},
|
||||
|
@ -98,6 +98,10 @@ var ShumwayBootstrapUtils = {
|
||||
isRegistered: false,
|
||||
|
||||
register: function () {
|
||||
if (this.isRegistered) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.isRegistered = true;
|
||||
|
||||
// Register the components.
|
||||
@ -121,6 +125,10 @@ var ShumwayBootstrapUtils = {
|
||||
},
|
||||
|
||||
unregister: function () {
|
||||
if (!this.isRegistered) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.isRegistered = false;
|
||||
|
||||
// Remove the contract/component.
|
||||
|
@ -392,21 +392,19 @@ ShumwayStreamConverterBase.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (!url) { // at this point url shall be known -- asserting
|
||||
throw new Error('Movie url is not specified');
|
||||
}
|
||||
|
||||
baseUrl = pageUrl;
|
||||
if (objectParams.base) {
|
||||
baseUrl = Services.io.newURI(objectParams.base, null, pageUrl).spec;
|
||||
} else {
|
||||
baseUrl = pageUrl;
|
||||
try {
|
||||
var parsedPageUrl = Services.io.newURI(pageUrl);
|
||||
baseUrl = Services.io.newURI(objectParams.base, null, parsedPageUrl).spec;
|
||||
} catch (e) { /* ignore */ }
|
||||
}
|
||||
|
||||
var movieParams = {};
|
||||
if (objectParams.flashvars) {
|
||||
movieParams = parseQueryString(objectParams.flashvars);
|
||||
}
|
||||
var queryStringMatch = /\?([^#]+)/.exec(url);
|
||||
var queryStringMatch = url && /\?([^#]+)/.exec(url);
|
||||
if (queryStringMatch) {
|
||||
var queryStringParams = parseQueryString(queryStringMatch[1]);
|
||||
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 = {};
|
||||
startupInfo.window = window;
|
||||
@ -494,6 +493,18 @@ ShumwayStreamConverterBase.prototype = {
|
||||
var domWindow = getDOMWindow(channel);
|
||||
let startupInfo = converter.getStartupInfo(domWindow,
|
||||
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)) {
|
||||
fallbackToNativePlugin(domWindow, false, true);
|
||||
return;
|
||||
@ -515,8 +526,6 @@ ShumwayStreamConverterBase.prototype = {
|
||||
ActivationQueue.enqueue(startupInfo, function(domWindow) {
|
||||
activateShumwayScripts(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) {
|
||||
if (!allowScriptAccessParameter) {
|
||||
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
|
||||
02fd13d
|
||||
0.10.312
|
||||
9de7c7a
|
||||
|
Loading…
Reference in New Issue
Block a user