From d1e56cb58ad95149acf8c1063e6abdef8c727d4f Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 17 Oct 2017 15:46:44 +0800 Subject: [PATCH 1/2] Removes fake console.log since it's implemented in native code now. --- jsb/index.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/jsb/index.js b/jsb/index.js index 23d5f91171..3859bbd5a5 100644 --- a/jsb/index.js +++ b/jsb/index.js @@ -25,17 +25,6 @@ 'use strict'; -var originLog = console.log; - -// overwrite original console.log -try { - console.log = function () { - originLog.call(console, cc.js.formatStr.apply(null, arguments)); - }; -} -catch (e) { -} - function defineMacro (name, defaultValue) { // if "global_defs" not preprocessed by uglify, just declare them globally, // this may happened in release version's preview page. From 9a59f75c24fb5159a36dc9b8c36d96c9e5dcae8c Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 17 Oct 2017 15:55:13 +0800 Subject: [PATCH 2/2] CC_JSB condition check for console.time --- polyfill/misc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polyfill/misc.js b/polyfill/misc.js index 31c4065874..aa62b6bb68 100644 --- a/polyfill/misc.js +++ b/polyfill/misc.js @@ -14,7 +14,7 @@ if (!Number.isInteger) { }; } -if (!console.time) { +if (CC_JSB || !console.time) { var Timer = window.performance || Date; var _timerTable = Object.create(null); console.time = function (label) {