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

Unified Diff: include/v8.h

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Feedback from mseaborn Created 3 years, 11 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/api.cc » ('j') | src/trap-handler/signal-handler.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 4b6134d1781c4c25f8079afdbbb7939f079e5f86..85cb2b7a9bd05b1c03f0725d333f61ada352a3ca 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -7646,6 +7646,32 @@ class V8_EXPORT V8 {
*/
static void ShutdownPlatform();
+ /**
+ * Given the V8 signal handler a chance to handle a fault.
+ *
+ * This function determines whether a memory access violation can be recovered
+ * by V8. If so, it will return true and set return_address to a location
+ * to jump to in order to recover from the fault. Otherwise, TryHandleFault
+ * will return true.
+ *
+ * \param source_instruction The address of the instruction that caused the
+ * fault.
+ *
+ * \param target_data The address that the faulting instruction was trying
+ * to read from or write to.
+ *
+ * \param return_address An output parameter where TryHandleFault will store
+ * the return address if V8 can recover from the fault.
+ */
+ static bool TryHandleFault(void* source_instruction, void* target_data,
+ void** return_address);
+
+ /**
+ * 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/api.cc » ('j') | src/trap-handler/signal-handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698