mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167794 - Allow dumping shim debugging to stdout (r=gabor,a=KWierso)
This commit is contained in:
parent
bd13db15e2
commit
2e23246230
@ -74,6 +74,15 @@ let CompatWarning = {
|
||||
/*flags*/ Ci.nsIScriptError.warningFlag,
|
||||
/*category*/ "chrome javascript");
|
||||
Services.console.logMessage(error);
|
||||
|
||||
if (Preferences.get("dom.ipc.shims.dumpWarnings", false)) {
|
||||
dump(message + "\n");
|
||||
while (stack) {
|
||||
dump(stack + "\n");
|
||||
stack = stack.caller;
|
||||
}
|
||||
dump("\n");
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -616,7 +616,7 @@ let EventTargetInterposition = new Interposition("EventTargetInterposition");
|
||||
EventTargetInterposition.methods.addEventListener =
|
||||
function(addon, target, type, listener, useCapture, wantsUntrusted) {
|
||||
let delayed = CompatWarning.delayedWarning(
|
||||
"Registering an event listener on content DOM nodes" +
|
||||
`Registering a ${type} event listener on content DOM nodes` +
|
||||
" needs to happen in the content process.",
|
||||
addon, CompatWarning.warnings.DOM_events);
|
||||
|
||||
@ -819,7 +819,7 @@ function makeDummyContentWindow(browser) {
|
||||
}
|
||||
|
||||
RemoteBrowserElementInterposition.getters.contentWindow = function(addon, target) {
|
||||
CompatWarning.warn("Direct access to content objects will no longer work in the chrome process.",
|
||||
CompatWarning.warn("Direct access to browser.contentWindow will no longer work in the chrome process.",
|
||||
addon, CompatWarning.warnings.content);
|
||||
|
||||
// If we don't have a CPOW yet, just return something we can use for
|
||||
@ -847,7 +847,7 @@ function getContentDocument(addon, browser)
|
||||
}
|
||||
|
||||
RemoteBrowserElementInterposition.getters.contentDocument = function(addon, target) {
|
||||
CompatWarning.warn("Direct access to content objects will no longer work in the chrome process.",
|
||||
CompatWarning.warn("Direct access to browser.contentDocument will no longer work in the chrome process.",
|
||||
addon, CompatWarning.warnings.content);
|
||||
|
||||
return getContentDocument(addon, target);
|
||||
@ -857,7 +857,7 @@ let TabBrowserElementInterposition = new Interposition("TabBrowserElementInterpo
|
||||
EventTargetInterposition);
|
||||
|
||||
TabBrowserElementInterposition.getters.contentWindow = function(addon, target) {
|
||||
CompatWarning.warn("Direct access to content objects will no longer work in the chrome process.",
|
||||
CompatWarning.warn("Direct access to gBrowser.contentWindow will no longer work in the chrome process.",
|
||||
addon, CompatWarning.warnings.content);
|
||||
|
||||
if (!target.selectedBrowser.contentWindowAsCPOW) {
|
||||
@ -867,7 +867,7 @@ TabBrowserElementInterposition.getters.contentWindow = function(addon, target) {
|
||||
};
|
||||
|
||||
TabBrowserElementInterposition.getters.contentDocument = function(addon, target) {
|
||||
CompatWarning.warn("Direct access to content objects will no longer work in the chrome process.",
|
||||
CompatWarning.warn("Direct access to gBrowser.contentDocument will no longer work in the chrome process.",
|
||||
addon, CompatWarning.warnings.content);
|
||||
|
||||
let browser = target.selectedBrowser;
|
||||
@ -945,7 +945,7 @@ let ChromeWindowInterposition = new Interposition("ChromeWindowInterposition",
|
||||
// that should be using content instead.
|
||||
ChromeWindowInterposition.getters.content =
|
||||
ChromeWindowInterposition.getters._content = function(addon, target) {
|
||||
CompatWarning.warn("Direct access to content objects will no longer work in the chrome process.",
|
||||
CompatWarning.warn("Direct access to chromeWindow.content will no longer work in the chrome process.",
|
||||
addon, CompatWarning.warnings.content);
|
||||
|
||||
let browser = target.gBrowser.selectedBrowser;
|
||||
|
Loading…
Reference in New Issue
Block a user