react-native/ReactCommon/inspector/LegacyDebuggerAgent.h
Alexander Blom 27f504e9e3 Add Console agent
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
2016-11-02 12:29:15 -07:00

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_;
};
}
}