Skip to content

Commit

Permalink
Extend CrashManager to allow removing custom data.
Browse files Browse the repository at this point in the history
Reviewed By: dulinriley

Differential Revision: D17661506

fbshipit-source-id: d4b3a3919a5f023da3ec45ff64976da5403414e6
  • Loading branch information
David Detlefs authored and facebook-github-bot committed Oct 3, 2019
1 parent 36a644d commit 96fee67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/hermes/Public/CrashManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 96fee67

Please sign in to comment.