[Spice-devel] [PATCH spice-html5] Disable the onload function when clearing the image source.

Jeremy White jwhite at codeweavers.com
Thu Dec 29 21:27:47 UTC 2016


This fixes a bug introduced by my commit 42134d3e, which would
lead to an infinite recursion of onload statements.

Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 display.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/display.js b/display.js
index 40a809e..6691c5e 100644
--- a/display.js
+++ b/display.js
@@ -933,6 +933,7 @@ function handle_draw_jpeg_onload()
 
         // Give the Garbage collector a clue to recycle this; avoids
         //  fairly massive memory leaks during video playback
+        this.onload = undefined;
         this.src = EMPTY_GIF_IMAGE;
 
         if (this.o.descriptor &&
-- 
2.1.4



More information about the Spice-devel mailing list