Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #449 from PanayotCankov/patch-1
Browse files Browse the repository at this point in the history
Mark init and getRemoteConfig for profiling
  • Loading branch information
EddyVerbruggen authored Aug 23, 2017
2 parents 6ddbdc9 + 8ca3f55 commit 53e9f4c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions firebase.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var utils = require("utils/utils");
var frame = require("ui/frame");
var fs = require("file-system");
var firebase = require("./firebase-common");
var profile = require("profiling").profile;

firebase._launchNotification = null;

Expand Down Expand Up @@ -178,7 +179,7 @@ firebase.authStateListener = null;
firebase.init = function (arg) {
return new Promise(function (resolve, reject) {

function _resolve() {
const _resolve = profile("firebase.init resolve", function _resolve() {
if (firebase.instance !== null) {
reject("You already ran init");
return;
Expand Down Expand Up @@ -259,7 +260,7 @@ firebase.init = function (arg) {
}

resolve(firebase.instance);
}
});

try {
if (appModule.android.foregroundActivity) {
Expand Down Expand Up @@ -657,7 +658,7 @@ firebase.getRemoteConfig = function (arg) {
return;
}

function _resolve() {
const _resolve = profile("firebase.getRemoteConfig resolve", function _resolve() {
if (!firebase._isGooglePlayServicesAvailable()) {
reject("Google Play services is required for this feature, but not available on this device");
return;
Expand Down Expand Up @@ -720,7 +721,7 @@ firebase.getRemoteConfig = function (arg) {
firebaseRemoteConfig.fetch(expirationDuration)
.addOnSuccessListener(onSuccessListener)
.addOnFailureListener(onFailureListener);
}
});

try {
if (appModule.android.foregroundActivity) {
Expand Down

0 comments on commit 53e9f4c

Please sign in to comment.