mirror of
https://github.com/status-im/react-native.git
synced 2025-02-13 18:06:37 +00:00
Reviewed By: dcaspi Differential Revision: D5185504 fbshipit-source-id: 4f7e9f9068598418b346a7370f6be241a0784b60
53 lines
1.0 KiB
C++
53 lines
1.0 KiB
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include <cxxreact/Executor.h>
|
|
#include <cxxreact/MessageQueueThread.h>
|
|
#include <jschelpers/JavaScriptCore.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
namespace ReactMarker {
|
|
|
|
enum ReactMarkerId {
|
|
NATIVE_REQUIRE_START,
|
|
NATIVE_REQUIRE_STOP,
|
|
RUN_JS_BUNDLE_START,
|
|
RUN_JS_BUNDLE_STOP,
|
|
CREATE_REACT_CONTEXT_STOP,
|
|
JS_BUNDLE_STRING_CONVERT_START,
|
|
JS_BUNDLE_STRING_CONVERT_STOP,
|
|
};
|
|
|
|
using LogTaggedMarker = std::function<void(const ReactMarkerId, const char* tag)>;
|
|
extern LogTaggedMarker logTaggedMarker;
|
|
|
|
extern void logMarker(const ReactMarkerId markerId);
|
|
|
|
}
|
|
|
|
namespace JSCNativeHooks {
|
|
|
|
using Hook = JSValueRef(*)(
|
|
JSContextRef ctx,
|
|
JSObjectRef function,
|
|
JSObjectRef thisObject,
|
|
size_t argumentCount,
|
|
const JSValueRef arguments[],
|
|
JSValueRef *exception);
|
|
extern Hook loggingHook;
|
|
extern Hook nowHook;
|
|
|
|
using ConfigurationHook = std::function<void(JSGlobalContextRef)>;
|
|
extern ConfigurationHook installPerfHooks;
|
|
|
|
}
|
|
|
|
} }
|