summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-02 07:08:14 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-05-02 07:08:14 +0200
commit3dfd1412e4accfb442ddb9b83bf4e324742756c5 (patch)
tree7e95ecddc7e319c47164e175cd31f417646fad7c
parent61de1c80cdc6c04e71fde07cc5028af503438134 (diff)
downloadUXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar
UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar.gz
UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar.lz
UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar.xz
UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.zip
Building with "--enable-debug" - fix some warnings
https://github.com/MoonchildProductions/moebius/pull/146 https://github.com/MoonchildProductions/Pale-Moon/pull/1400
-rwxr-xr-xdevtools/client/sourceeditor/tern/def.js5
-rw-r--r--layout/base/nsLayoutUtils.cpp5
-rw-r--r--toolkit/jetpack/dev/volcan.js2
-rw-r--r--toolkit/jetpack/sdk/lang/weak-set.js4
-rw-r--r--xpfe/appshell/nsWindowMediator.cpp4
5 files changed, 10 insertions, 10 deletions
diff --git a/devtools/client/sourceeditor/tern/def.js b/devtools/client/sourceeditor/tern/def.js
index 71f6e7991..f4a7ba9c8 100755
--- a/devtools/client/sourceeditor/tern/def.js
+++ b/devtools/client/sourceeditor/tern/def.js
@@ -77,7 +77,8 @@
}
},
word: function(re) {
- var word = "", ch, re = re || /[\w$]/;
+ var word = "", ch;
+ re = re || /[\w$]/;
while ((ch = this.spec.charAt(this.pos)) && re.test(ch)) { word += ch; ++this.pos; }
return word;
},
@@ -187,7 +188,7 @@
if (top && this.forceNew) return new infer.Obj(base);
return infer.getInstance(base);
} else if (this.eat(":")) {
- var name = this.word(/[\w$\.]/)
+ name = this.word(/[\w$\.]/)
return infer.getSymbol(name)
} else if (comp && this.eat("!")) {
var arg = this.word(/\d/);
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index 86874f404..9d8dd81bf 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -6653,8 +6653,9 @@ nsLayoutUtils::DrawSingleImage(gfxContext& aContext,
nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel();
CSSIntSize pixelImageSize(ComputeSizeForDrawingWithFallback(aImage, aDest.Size()));
if (pixelImageSize.width < 1 || pixelImageSize.height < 1) {
- NS_WARNING("Image width or height is non-positive");
- return DrawResult::TEMPORARY_ERROR;
+ NS_ASSERTION(pixelImageSize.width >= 0 && pixelImageSize.height >= 0,
+ "Image width or height is negative");
+ return DrawResult::SUCCESS; // no point in drawing a zero size image
}
nsSize imageSize(CSSPixel::ToAppUnits(pixelImageSize));
diff --git a/toolkit/jetpack/dev/volcan.js b/toolkit/jetpack/dev/volcan.js
index 6a68ed12d..7ec208eec 100644
--- a/toolkit/jetpack/dev/volcan.js
+++ b/toolkit/jetpack/dev/volcan.js
@@ -139,7 +139,7 @@ var Client = Class({
.then(this.onReady.bind(this, this.root), this.onFail);
} else {
var actor = this.get(packet.from) || this.root;
- var event = actor.events[packet.type];
+ event = actor.events[packet.type];
if (event) {
var message = new MessageEvent(packet.type, {
data: event.read(packet)
diff --git a/toolkit/jetpack/sdk/lang/weak-set.js b/toolkit/jetpack/sdk/lang/weak-set.js
index 8972602a5..0b81a395b 100644
--- a/toolkit/jetpack/sdk/lang/weak-set.js
+++ b/toolkit/jetpack/sdk/lang/weak-set.js
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict";
+
module.metadata = {
"stability": "experimental"
};
-"use strict";
-
const { Cu } = require("chrome");
function makeGetterFor(Type) {
diff --git a/xpfe/appshell/nsWindowMediator.cpp b/xpfe/appshell/nsWindowMediator.cpp
index 6d69bc764..35ae550ae 100644
--- a/xpfe/appshell/nsWindowMediator.cpp
+++ b/xpfe/appshell/nsWindowMediator.cpp
@@ -616,12 +616,10 @@ nsWindowMediator::GetZLevel(nsIXULWindow *aWindow, uint32_t *_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = nsIXULWindow::normalZ;
+ // This can fail during window destruction.
nsWindowInfo *info = GetInfoFor(aWindow);
if (info) {
*_retval = info->mZLevel;
- } else {
- NS_WARNING("getting z level of unregistered window");
- // this goes off during window destruction
}
return NS_OK;
}