mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
27f504e9e3
Summary: Adds the Console agent which we hook from our console polyfill. It captures the stack and strips the frames of the polyfill. Reviewed By: davidaurelio Differential Revision: D4021502 fbshipit-source-id: 49cb700a139270485b7595e85e52d50c9a620db6
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "ConsoleAgent.h"
|
|
#include "LegacyScriptDebugServer.h"
|
|
|
|
#include <JavaScriptCore/config.h>
|
|
#include <JavaScriptCore/InspectorDebuggerAgent.h>
|
|
#include <JavaScriptCore/InspectorConsoleAgent.h>
|
|
|
|
namespace JSC {
|
|
class JSGlobalObject;
|
|
}
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class LegacyDebuggerAgent : public Inspector::InspectorDebuggerAgent {
|
|
public:
|
|
LegacyDebuggerAgent(Inspector::InjectedScriptManager*, JSC::JSGlobalObject&, ConsoleAgent*);
|
|
|
|
virtual LegacyScriptDebugServer& scriptDebugServer() override { return scriptDebugServer_; }
|
|
|
|
virtual void startListeningScriptDebugServer() override;
|
|
virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) override;
|
|
virtual Inspector::InjectedScript injectedScriptForEval(Inspector::ErrorString*, const int* executionContextId) override;
|
|
|
|
virtual void breakpointActionLog(JSC::ExecState*, const String&) override;
|
|
|
|
virtual void muteConsole() override { }
|
|
virtual void unmuteConsole() override { }
|
|
|
|
private:
|
|
LegacyScriptDebugServer scriptDebugServer_;
|
|
ConsoleAgent* consoleAgent_;
|
|
};
|
|
|
|
}
|
|
}
|