mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove compact parameter from heap snapshots
Summary: This parameter used to be useful for a custom format hermes was developing, but since Hermes now outputs the Chrome format it isn't useful. Chrome actually disallows prettified JSON, and requires a special version that is faster to parse. Therefore, `compact` was the only supported mode. Changelog: [Internal] Remove compact parameter from `createSnapshotToFile` Reviewed By: willholen Differential Revision: D17726742 fbshipit-source-id: 6f39af9046dff2f3b4fba822312a9a89c939ed89
This commit is contained in:
committed by
Facebook Github Bot
parent
8c7ec51981
commit
f91a21b2c0
@@ -335,12 +335,12 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
plain().instrumentation().collectGarbage();
|
||||
}
|
||||
|
||||
bool createSnapshotToFile(const std::string& path, bool compact) override {
|
||||
return plain().instrumentation().createSnapshotToFile(path, compact);
|
||||
bool createSnapshotToFile(const std::string& path) override {
|
||||
return plain().instrumentation().createSnapshotToFile(path);
|
||||
}
|
||||
|
||||
bool createSnapshotToStream(std::ostream& os, bool compact) override {
|
||||
return plain().instrumentation().createSnapshotToStream(os, compact);
|
||||
bool createSnapshotToStream(std::ostream& os) override {
|
||||
return plain().instrumentation().createSnapshotToStream(os);
|
||||
}
|
||||
|
||||
void writeBridgeTrafficTraceToFile(
|
||||
|
||||
@@ -56,19 +56,15 @@ class Instrumentation {
|
||||
///
|
||||
/// \param path to save the heap capture
|
||||
///
|
||||
/// \param compact Whether the JSON should be compact or pretty
|
||||
///
|
||||
/// \return true iff the heap capture succeeded
|
||||
virtual bool createSnapshotToFile(const std::string& path, bool compact) = 0;
|
||||
virtual bool createSnapshotToFile(const std::string& path) = 0;
|
||||
|
||||
/// Captures the heap to an output stream
|
||||
///
|
||||
/// \param os output stream to write to.
|
||||
///
|
||||
/// \param compact Whether the JSON should be compact or pretty
|
||||
///
|
||||
/// \return true iff the heap capture succeeded.
|
||||
virtual bool createSnapshotToStream(std::ostream& os, bool compact) = 0;
|
||||
virtual bool createSnapshotToStream(std::ostream& os) = 0;
|
||||
|
||||
/// Write a trace of bridge traffic to the given file name.
|
||||
virtual void writeBridgeTrafficTraceToFile(
|
||||
|
||||
@@ -78,11 +78,11 @@ Instrumentation& Runtime::instrumentation() {
|
||||
|
||||
void collectGarbage() override {}
|
||||
|
||||
bool createSnapshotToFile(const std::string&, bool) override {
|
||||
bool createSnapshotToFile(const std::string&) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool createSnapshotToStream(std::ostream&, bool) override {
|
||||
bool createSnapshotToStream(std::ostream&) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user