Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/7bc29f778280c8b413820...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/7bc29f778280c8b41382063...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/7bc29f778280c8b4138206313...
The branch, master has been updated
via 7bc29f778280c8b4138206313774f5c589a8da4e (commit)
via ad779dc38a90b2dd243fa20fe4c504ae21985999 (commit)
from 3cabd331ee1b638b02334155f831a8715fea399a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=7bc29f778280c8b4138...
commit 7bc29f778280c8b4138206313774f5c589a8da4e
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Attempt to fix spurious plotter crashes
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 2aca7a3..c2fd2e7 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -522,6 +522,7 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
int plot_height;
struct MinList shared_pens;
struct gui_globals bm_globals;
+ struct gui_globals *temp_gg = glob;
struct redraw_context ctx = {
.interactive = false,
@@ -562,12 +563,18 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
#endif
/**\todo In theory we should be able to move the bitmap to our native area
- to try to avoid re-conversion */
+ to try to avoid re-conversion (at the expense of memory) */
ami_free_layers(&bm_globals);
ami_plot_release_pens(&shared_pens);
amiga_bitmap_set_opaque(bitmap, true);
+ /* Restore previous render area. This is set when plotting starts,
+ * but if bitmap_render is called *during* a browser render then
+ * having an invalid pointer here causes NetSurf to crash.
+ */
+ glob = temp_gg;
+
return NSERROR_OK;
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=ad779dc38a90b2dd243...
commit ad779dc38a90b2dd243fa20fe4c504ae21985999
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Revert "Attempt to avoid a crash in ami_plot()"
This reverts commit e64d48980e38448eeb83daa8659788d48f845692.
diff --git a/amiga/plotters.c b/amiga/plotters.c
index a3c8138..fa5f661 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -388,8 +388,6 @@ static bool ami_clip(const struct rect *clip)
struct Region *reg = NULL;
- if(!glob || !glob->rp || !glob->rp->Layer) return true;
-
if(glob->rp->Layer)
{
reg = NewRegion();
-----------------------------------------------------------------------
Summary of changes:
amiga/bitmap.c | 9 ++++++++-
amiga/plotters.c | 2 --
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 2aca7a3..c2fd2e7 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -522,6 +522,7 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
int plot_height;
struct MinList shared_pens;
struct gui_globals bm_globals;
+ struct gui_globals *temp_gg = glob;
struct redraw_context ctx = {
.interactive = false,
@@ -562,12 +563,18 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
#endif
/**\todo In theory we should be able to move the bitmap to our native area
- to try to avoid re-conversion */
+ to try to avoid re-conversion (at the expense of memory) */
ami_free_layers(&bm_globals);
ami_plot_release_pens(&shared_pens);
amiga_bitmap_set_opaque(bitmap, true);
+ /* Restore previous render area. This is set when plotting starts,
+ * but if bitmap_render is called *during* a browser render then
+ * having an invalid pointer here causes NetSurf to crash.
+ */
+ glob = temp_gg;
+
return NSERROR_OK;
}
diff --git a/amiga/plotters.c b/amiga/plotters.c
index a3c8138..fa5f661 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -388,8 +388,6 @@ static bool ami_clip(const struct rect *clip)
struct Region *reg = NULL;
- if(!glob || !glob->rp || !glob->rp->Layer) return true;
-
if(glob->rp->Layer)
{
reg = NewRegion();
--
NetSurf Browser