From 96fee67ce52675b18696945d2047142fa9722b93 Mon Sep 17 00:00:00 2001 From: David Detlefs Date: Thu, 3 Oct 2019 10:43:46 -0700 Subject: [PATCH] Extend CrashManager to allow removing custom data. Reviewed By: dulinriley Differential Revision: D17661506 fbshipit-source-id: d4b3a3919a5f023da3ec45ff64976da5403414e6 --- public/hermes/Public/CrashManager.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/hermes/Public/CrashManager.h b/public/hermes/Public/CrashManager.h index 01f4ad261c4..cf88188fae9 100644 --- a/public/hermes/Public/CrashManager.h +++ b/public/hermes/Public/CrashManager.h @@ -41,6 +41,10 @@ class CrashManager { /// \param val The value to store for the given key. virtual void setCustomData(const char *key, const char *val) = 0; + /// If the given \p key has an associated custom data string, remove the + /// association. + virtual void removeCustomData(const char *key) = 0; + /// Registers a function to be called after a crash has occurred. This /// function can examine memory and serialize this to a JSON output stream. /// Implmentations decide where the stream is routed to. @@ -76,6 +80,7 @@ class NopCrashManager final : public CrashManager { void registerMemory(void *, size_t) override {} void unregisterMemory(void *) override {} void setCustomData(const char *, const char *) override {} + void removeCustomData(const char *) override {} CallbackKey registerCallback(CallbackFunc /*callback*/) override { return 0; }