mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1020948 - Ensure fetching script sources when DebuggerObject.source fails. r=past
This commit is contained in:
parent
7ccc46ba56
commit
bd01301016
@ -39,7 +39,8 @@ let addonManager = null;
|
||||
* about them.
|
||||
*/
|
||||
function mapURIToAddonID(uri, id) {
|
||||
if ((Services.appinfo.ID || undefined) == B2G_ID) {
|
||||
if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT ||
|
||||
(Services.appinfo.ID || undefined) == B2G_ID) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -5058,7 +5059,13 @@ ThreadSources.prototype = {
|
||||
.QueryInterface(Ci.nsIURL);
|
||||
if (url.fileExtension === "js") {
|
||||
spec.contentType = "text/javascript";
|
||||
spec.text = aScript.source.text;
|
||||
// If the Debugger API wasn't able to load the source,
|
||||
// because sources were discarded
|
||||
// (javascript.options.discardSystemSource == true),
|
||||
// give source() a chance to fetch them.
|
||||
if (aScript.source.text != "[no source]") {
|
||||
spec.text = aScript.source.text;
|
||||
}
|
||||
}
|
||||
} catch(ex) {
|
||||
// Not a valid URI.
|
||||
|
Loading…
Reference in New Issue
Block a user