Преглед изворни кода

Merge pull request #581 from jitsi/rn-callstats

[RN] Fixes problem with CallStats on mobile
dev1
Saúl Ibarra Corretgé пре 8 година
родитељ
комит
360ffde341
2 измењених фајлова са 8 додато и 3 уклоњено
  1. 7
    2
      modules/statistics/CallStats.js
  2. 1
    1
      package.json

+ 7
- 2
modules/statistics/CallStats.js Прегледај датотеку

@@ -288,7 +288,12 @@ export default class CallStats {
288 288
                 // to not log the whole log batch
289 289
                 // FIXME check the current logging level (currently not exposed
290 290
                 // by the logger implementation)
291
-                console && console.debug('reportError', pc, cs, type);
291
+                // NOTE it is not safe to log whole objects on react-native as
292
+                // those contain too many circular references and may crash
293
+                // the app.
294
+                if (!RTCBrowserType.isReactNative()) {
295
+                    console && console.debug('reportError', pc, cs, type);
296
+                }
292 297
             } else {
293 298
                 logger.debug('reportError', pc, cs, type, ...args);
294 299
             }
@@ -506,7 +511,7 @@ export default class CallStats {
506 511
      * @return {boolean} true if the call was successful or false otherwise.
507 512
      */
508 513
     _addNewFabric() {
509
-        logger.info('addNewFabric', this.remoteUserID, this);
514
+        logger.info('addNewFabric', this.remoteUserID);
510 515
         try {
511 516
             const ret
512 517
                 = CallStats.backend.addNewFabric(

+ 1
- 1
package.json Прегледај датотеку

@@ -19,7 +19,7 @@
19 19
     "async": "0.9.0",
20 20
     "current-executing-script": "0.1.3",
21 21
     "jitsi-meet-logger": "jitsi/jitsi-meet-logger",
22
-    "react-native-callstats": "3.19.8",
22
+    "react-native-callstats": "3.23.0",
23 23
     "retry": "0.6.1",
24 24
     "sdp-interop": "0.1.12",
25 25
     "sdp-simulcast": "0.2.1",

Loading…
Откажи
Сачувај