Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: include/v8.h

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Restore signal mask at the right place Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/DEPS » ('j') | src/compiler/wasm-compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 5bb470a2ae3129c5d3d55941e7016e8ae41bf7e0..f2eba4d29af1514cf5cbe7fe633e4ec6896eebc3 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -7649,6 +7649,35 @@ class V8_EXPORT V8 {
*/
static void ShutdownPlatform();
+#if V8_OS_LINUX && V8_TARGET_ARCH_X64
+ /**
+ * Given the V8 signal handler a chance to handle a fault.
ahaas 2017/02/20 09:27:23 "Give" I guess
Eric Holk 2017/02/23 02:16:55 Done.
+ *
+ * This function determines whether a memory access violation can be recovered
+ * by V8. If so, it will return true and modify context to return to a code
+ * fragment that can recover from the fault. Otherwise, TryHandleSignal will
+ * return true.
ahaas 2017/02/20 09:27:23 return false;
Eric Holk 2017/02/23 02:16:55 Done.
+ *
+ * The parameters to this function correspond to those passed to a Linux
+ * signal handler.
+ *
+ * \param signum The signal number.
ahaas 2017/02/20 09:27:23 I would still prefer the name signal_number
Eric Holk 2017/02/23 02:16:55 Done.
+ *
+ * \param info A pointer to the siginfo_t structure provided to the signal
+ * handler.
+ *
+ * \param context The third argument passed to the Linux signal handler, which
+ * points to a ucontext_t structure.
+ */
+ static bool TryHandleSignal(int signum, void* info, void* context);
+#endif // V8_OS_LINUX
+
+ /**
+ * Enable the default signal handler rather than using one provided by the
+ * embedder.
+ */
+ static bool RegisterDefaultSignalHandler();
+
private:
V8();
« no previous file with comments | « BUILD.gn ('k') | src/DEPS » ('j') | src/compiler/wasm-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698