GNOME Bugzilla – Bug 782861
Fixes for newer GJS versions
Last modified: 2017-11-13 20:25:07 UTC
I actually tried running from Flatpak (running on my work laptop, my home development system run the Nvidia driver) and found some bugs due to newer GJS, which seems to be stricter at using undefined properties on JS objects. In some places we create an empty object (using = {}) and then at some point does an "if (obj.property). We should probably use arrays for these instead, I think.
Created attachment 363091 [details] [review] utils: Remove unused argument
Created attachment 363092 [details] [review] mapView: Don't use object when undefined
Created attachment 363093 [details] [review] placeEntry: Remove unused arguments
Created attachment 363094 [details] [review] mainWindow: Remove unused arguments
Created attachment 363095 [details] [review] mainWindow: Remove unused arguments
Created attachment 363098 [details] [review] placePopover: Remove unused argument
Created attachment 363099 [details] [review] searchPopover: Remove unused argument
Created attachment 363101 [details] [review] routeEntry: Check presence of icon window
Created attachment 363102 [details] [review] routeQuery: Initialize the arriveBy property
Created attachment 363103 [details] [review] openTripPlanner: Check existence of color properties befor use
Created attachment 363104 [details] [review] mapMarker: Remove unused arguments
Created attachment 363105 [details] [review] transitBoardMarker: Remove unused arguments
Created attachment 363107 [details] [review] mapView: Remove unused arguments
Created attachment 363174 [details] [review] placeStore: Check property before use
Created attachment 363175 [details] [review] utils: Export debug variable using 'var'
Created attachment 363176 [details] [review] osmTypes: Export global constant with 'var'
Created attachment 363177 [details] [review] mapMarker: Remove unused arguments
Created attachment 363178 [details] [review] mainWindow: Remove unused arguments
Created attachment 363180 [details] [review] http: Check property before use in expression
Created attachment 363181 [details] [review] mapMarker: Remove unused arguments
Created attachment 363182 [details] [review] mapWalker: Don't use unexisting PlaceType enum constant
Created attachment 363259 [details] [review] socialPlaceMatcher: Compensate for JS string indecies starting at 0 The pseudo code for the iterative Levenstein implementation on Wikipedia assumes 1-indexed input strings. To minimize the impact just offset the indecies in the comparison statement using values from the strings. https://bugzilla.gnome.org/show_bug.cgi?id=789925
Created attachment 363260 [details] [review] socialPlaceMatcher: Compensate for JS string indecies starting at 0 The pseudo code for the iterative Levenstein implementation on Wikipedia assumes 1-indexed input strings. To minimize the impact just offset the indecies in the comparison statement using values from the strings.
Created attachment 363262 [details] [review] facebookBackend: Check for property before use
Created attachment 363311 [details] [review] mainWindow: Remove unused arguments
Created attachment 363312 [details] [review] mainWindow: Remove unused arguments
Attachment 363091 [details] pushed as bb68e9b - utils: Remove unused argument Attachment 363092 [details] pushed as c4c0ede - mapView: Don't use object when undefined Attachment 363093 [details] pushed as 94aa9e0 - placeEntry: Remove unused arguments Attachment 363098 [details] pushed as 81bec89 - placePopover: Remove unused argument Attachment 363099 [details] pushed as a542541 - searchPopover: Remove unused argument Attachment 363101 [details] pushed as 4a80377 - routeEntry: Check presence of icon window Attachment 363102 [details] pushed as 2dab92c - routeQuery: Initialize the arriveBy property Attachment 363103 [details] pushed as dbca7ea - openTripPlanner: Check existence of color properties befor use Attachment 363105 [details] pushed as 08e8094 - transitBoardMarker: Remove unused arguments Attachment 363107 [details] pushed as 65051d7 - mapView: Remove unused arguments Attachment 363174 [details] pushed as 42649db - placeStore: Check property before use Attachment 363175 [details] pushed as 721cd61 - utils: Export debug variable using 'var' Attachment 363176 [details] pushed as ef88ee5 - osmTypes: Export global constant with 'var' Attachment 363180 [details] pushed as 48f1078 - http: Check property before use in expression Attachment 363181 [details] pushed as f7a23af - mapMarker: Remove unused arguments Attachment 363182 [details] pushed as d48f2b7 - mapWalker: Don't use unexisting PlaceType enum constant Attachment 363260 [details] pushed as 080ce82 - socialPlaceMatcher: Compensate for JS string indecies starting at 0 Attachment 363262 [details] pushed as 6f4deb9 - facebookBackend: Check for property before use Attachment 363312 [details] pushed as 865ca35 - mainWindow: Remove unused arguments
Created attachment 363322 [details] [review] exportViewDialog: Remove unused argument
Comment on attachment 363322 [details] [review] exportViewDialog: Remove unused argument Attachment 363322 [details] pushed as 3709dd8 - exportViewDialog: Remove unused argument
Created attachment 363455 [details] [review] placeStore: Fix the exists method A condition was broken here resulting in adding favorites not working.
Created attachment 363456 [details] [review] mapView: Remove extra arguments to function
Attachment 363455 [details] pushed as 80ddfa7 - placeStore: Fix the exists method Attachment 363456 [details] pushed as 95975e3 - mapView: Remove extra arguments to function
Created attachment 363547 [details] [review] osmEditDialog: Initialize OSM type when adding new object Even though the OSM type is fallbacked to 'node' when serializing the object so it still worked, this avoids an ugly warning.
Comment on attachment 363547 [details] [review] osmEditDialog: Initialize OSM type when adding new object Attachment 363547 [details] pushed as 05705df - osmEditDialog: Initialize OSM type when adding new object