[gnome-maps/wip/mlundblad/shape-layer-fixes: 7/9] geoJSONSource: Pass tile to idle callback



commit 99fe27237e572829c099a409fd85eef98fa4ffb5
Author: Marcus Lundblad <ml update uu se>
Date:   Fri Feb 15 22:46:50 2019 +0100

    geoJSONSource: Pass tile to idle callback
    
    Pass the tile to the idle callback in the fill_tile
    vfunc implementation. Avoids use-after free from JS code.

 src/geoJSONSource.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/geoJSONSource.js b/src/geoJSONSource.js
index 5f9c26e..4c596c2 100644
--- a/src/geoJSONSource.js
+++ b/src/geoJSONSource.js
@@ -86,7 +86,7 @@ class GeoJSONSource extends Champlain.TileSource {
                 this.next_source.fill_tile(tile);
         });
 
-        Mainloop.idle_add(() => this._renderTile(tile));
+        Mainloop.idle_add(() => this._renderTile(tile), tile);
     }
 
     _validate([lon, lat]) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]