genode/qt4/src/lib/qt4/patches/qt4_webkit_crash.patch

39 lines
1.2 KiB
Diff

Webkit: print an error message before crashing
From: Christian Prochaska <christian.prochaska@genode-labs.com>
---
.../webkit/Source/JavaScriptCore/wtf/Assertions.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Assertions.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Assertions.h
index 862158b..77adac3 100644
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Assertions.h
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Assertions.h
@@ -50,6 +50,10 @@
#include <inttypes.h>
#endif
+#if OS(GENODE)
+#include <base/printf.h>
+#endif
+
#if OS(SYMBIAN)
#include <e32def.h>
#include <e32debug.h>
@@ -179,6 +183,13 @@ WTF_EXPORT_PRIVATE void WTFLogVerbose(const char* file, int line, const char* fu
*(int *)(uintptr_t)0xbbadbeef = 0; \
((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \
} while(false)
+#elif OS(GENODE)
+#define CRASH() do { \
+ PERR("WebKit CRASH in '%s'", WTF_PRETTY_FUNCTION); \
+ PERR(" in %s:%d", __FILE__, __LINE__); \
+ *(int *)(uintptr_t)0xbbadbeef = 0; \
+ ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \
+} while(false)
#else
#define CRASH() do { \
WTFReportBacktrace(); \