Use jni int types rather than uint64/32/16_t in JSCPerfLogging.cpp

Reviewed By: bnham

Differential Revision: D4213497

fbshipit-source-id: 47e0e7d72891e1070c350a60fb7d3597e99d49a1
This commit is contained in:
Michał Gregorczyk 2016-11-21 16:40:19 -08:00 committed by Facebook Github Bot
parent f3779502d3
commit b1bdae99c0
1 changed files with 5 additions and 6 deletions

View File

@ -17,7 +17,6 @@ using jqpl = _jqpl*;
namespace facebook { namespace jni { namespace facebook { namespace jni {
template<> template<>
class JObjectWrapper<jqpl> : public JObjectWrapper<jobject> { class JObjectWrapper<jqpl> : public JObjectWrapper<jobject> {
@ -28,31 +27,31 @@ class JObjectWrapper<jqpl> : public JObjectWrapper<jobject> {
void markerStart(int markerId, int instanceKey, long timestamp) { void markerStart(int markerId, int instanceKey, long timestamp) {
static auto markerStartMethod = static auto markerStartMethod =
qplClass()->getMethod<void(int32_t, int32_t, int64_t)>("markerStart"); qplClass()->getMethod<void(jint, jint, jlong)>("markerStart");
markerStartMethod(this_, markerId, instanceKey, timestamp); markerStartMethod(this_, markerId, instanceKey, timestamp);
} }
void markerEnd(int markerId, int instanceKey, short actionId, long timestamp) { void markerEnd(int markerId, int instanceKey, short actionId, long timestamp) {
static auto markerEndMethod = static auto markerEndMethod =
qplClass()->getMethod<void(int32_t, int32_t, int16_t, int64_t)>("markerEnd"); qplClass()->getMethod<void(jint, jint, jshort, jlong)>("markerEnd");
markerEndMethod(this_, markerId, instanceKey, actionId, timestamp); markerEndMethod(this_, markerId, instanceKey, actionId, timestamp);
} }
void markerNote(int markerId, int instanceKey, short actionId, long timestamp) { void markerNote(int markerId, int instanceKey, short actionId, long timestamp) {
static auto markerNoteMethod = static auto markerNoteMethod =
qplClass()->getMethod<void(int32_t, int32_t, int16_t, int64_t)>("markerNote"); qplClass()->getMethod<void(jint, jint, jshort, jlong)>("markerNote");
markerNoteMethod(this_, markerId, instanceKey, actionId, timestamp); markerNoteMethod(this_, markerId, instanceKey, actionId, timestamp);
} }
void markerCancel(int markerId, int instanceKey) { void markerCancel(int markerId, int instanceKey) {
static auto markerCancelMethod = static auto markerCancelMethod =
qplClass()->getMethod<void(int32_t, int32_t)>("markerCancel"); qplClass()->getMethod<void(jint, jint)>("markerCancel");
markerCancelMethod(this_, markerId, instanceKey); markerCancelMethod(this_, markerId, instanceKey);
} }
int64_t currentMonotonicTimestamp() { int64_t currentMonotonicTimestamp() {
static auto currentTimestampMethod = static auto currentTimestampMethod =
qplClass()->getMethod<int64_t()>("currentMonotonicTimestamp"); qplClass()->getMethod<jlong()>("currentMonotonicTimestamp");
return currentTimestampMethod(this_); return currentTimestampMethod(this_);
} }