Bug 827341: Fix relative icon path #7327

Merged
merged 1 commit into from Jan 9, 2013

Projects

None yet

3 participants

@julienw julienw commented on an outdated diff Jan 7, 2013
apps/homescreen/js/grid.js
@@ -808,6 +808,13 @@ const GridManager = (function() {
url.indexOf('https://') == 0)
return url;
+ if (url[0] != '/') {
@julienw
julienw Jan 7, 2013 Contributor

I'd use url.charAt(0) instead, it's not much longer and it is ES3 compatible.

@julienw julienw commented on an outdated diff Jan 7, 2013
apps/homescreen/js/grid.js
@@ -808,6 +808,13 @@ const GridManager = (function() {
url.indexOf('https://') == 0)
return url;
+ if (url[0] != '/') {
+ console.warn('`' + manifest.name + '` app icon is invalid. ' +
+ 'Manifest `icons` attribute should contain absolute ' +
+ 'paths from the origin.');
@julienw
julienw Jan 7, 2013 Contributor

'or data url' ?

@julienw
Contributor
julienw commented Jan 7, 2013

some nit

otherwise, seems good.

I'll try the patch later and I'll r+ only then.

@ochameau
Contributor
ochameau commented Jan 7, 2013

Comments adressed.

@vingtetun vingtetun merged commit 8e85602 into mozilla-b2g:master Jan 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment