@@ -18,7 +18,6 @@ namespace tns {
18
18
v8::Local<v8::Object> Console::createConsole (v8::Local<v8::Context> context, ConsoleCallback callback, const int maxLogcatObjectSize, const bool forceLog) {
19
19
m_callback = callback;
20
20
m_maxLogcatObjectSize = maxLogcatObjectSize;
21
- m_forceLog = forceLog;
22
21
v8::Context::Scope contextScope (context);
23
22
v8::Isolate* isolate = context->GetIsolate ();
24
23
@@ -167,9 +166,6 @@ const std::string buildLogString(const v8::FunctionCallbackInfo<v8::Value>& info
167
166
}
168
167
169
168
void Console::assertCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
170
- if (!shouldLog ()) {
171
- return ;
172
- }
173
169
try {
174
170
auto isolate = info.GetIsolate ();
175
171
@@ -206,9 +202,6 @@ void Console::assertCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
206
202
}
207
203
208
204
void Console::errorCallback (const v8::FunctionCallbackInfo <v8::Value>& info) {
209
- if (!shouldLog ()) {
210
- return ;
211
- }
212
205
try {
213
206
std::string log = buildLogString (info);
214
207
@@ -228,9 +221,6 @@ void Console::errorCallback(const v8::FunctionCallbackInfo <v8::Value>& info) {
228
221
}
229
222
230
223
void Console::infoCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
231
- if (!shouldLog ()) {
232
- return ;
233
- }
234
224
try {
235
225
std::string log = buildLogString (info);
236
226
@@ -250,9 +240,6 @@ void Console::infoCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
250
240
}
251
241
252
242
void Console::logCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
253
- if (!shouldLog ()) {
254
- return ;
255
- }
256
243
try {
257
244
std::string log = buildLogString (info);
258
245
@@ -272,9 +259,6 @@ void Console::logCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
272
259
}
273
260
274
261
void Console::warnCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
275
- if (!shouldLog ()) {
276
- return ;
277
- }
278
262
try {
279
263
std::string log = buildLogString (info);
280
264
@@ -294,9 +278,6 @@ void Console::warnCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
294
278
}
295
279
296
280
void Console::dirCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
297
- if (!shouldLog ()) {
298
- return ;
299
- }
300
281
try {
301
282
auto isolate = info.GetIsolate ();
302
283
auto context = isolate->GetCurrentContext ();
@@ -411,9 +392,6 @@ const std::string buildStacktraceFrameMessage(v8::Local<v8::StackFrame> frame) {
411
392
}
412
393
413
394
void Console::traceCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
414
- if (!shouldLog ()) {
415
- return ;
416
- }
417
395
try {
418
396
auto isolate = info.GetIsolate ();
419
397
std::stringstream ss;
@@ -457,9 +435,6 @@ void Console::traceCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
457
435
}
458
436
459
437
void Console::timeCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
460
- if (!shouldLog ()) {
461
- return ;
462
- }
463
438
try {
464
439
auto isolate = info.GetIsolate ();
465
440
@@ -496,9 +471,6 @@ void Console::timeCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
496
471
}
497
472
498
473
void Console::timeEndCallback (const v8::FunctionCallbackInfo<v8::Value>& info) {
499
- if (!shouldLog ()) {
500
- return ;
501
- }
502
474
try {
503
475
auto isolate = info.GetIsolate ();
504
476
@@ -563,11 +535,4 @@ const char* Console::LOG_TAG = "JS";
563
535
std::map<v8::Isolate*, std::map<std::string, double >> Console::s_isolateToConsoleTimersMap;
564
536
ConsoleCallback Console::m_callback = nullptr ;
565
537
int Console::m_maxLogcatObjectSize;
566
- bool Console::m_forceLog;
567
-
568
- #ifdef APPLICATION_IN_DEBUG
569
- bool Console::isApplicationInDebug = true ;
570
- #else
571
- bool Console::isApplicationInDebug = false ;
572
- #endif
573
538
}
0 commit comments