@@ -47,7 +47,7 @@ index 3cfc92533..9c487ac45 100644
4747+ #ifdef ANDROID
4848+ __android_log_print(ANDROID_LOG_ERROR, "Gecko", "mozalloc_abort: %s", msg);
4949+ #elif defined(OHOS)
50- + (void) OH_LOG_Print(LOG_APP, LOG_ERROR, 0 , "Gecko",
50+ + (void) OH_LOG_Print(LOG_APP, LOG_ERROR, 0xEOC4 , "Gecko",
5151+ "mozalloc_abort: %{public}s\n", msg);
5252+ #else
5353 fputs(msg, stderr);
@@ -75,7 +75,7 @@ index 0b7395177..e84d76aba 100644
7575 /* aMaxFrames */ 0);
7676 # endif
7777+ #elif defined(OHOS)
78- + (void) OH_LOG_Print(LOG_APP, LOG_FATAL, 0 , "MOZ_Assert",
78+ + (void) OH_LOG_Print(LOG_APP, LOG_FATAL, 0xE0C4 , "MOZ_Assert",
7979+ "Assertion failure: %{public}s, at %{public}s:%{public}d\n",
8080+ aStr, aFilename, aLine);
8181 #else
@@ -86,7 +86,7 @@ index 0b7395177..e84d76aba 100644
8686 "[%d] Hit MOZ_CRASH(%s) at %s:%d\n", MOZ_GET_PID(), aStr,
8787 aFilename, aLine);
8888+ #elif defined(OHOS)
89- + (void) OH_LOG_Print(LOG_APP, LOG_FATAL, 0 , "MOZ_CRASH",
89+ + (void) OH_LOG_Print(LOG_APP, LOG_FATAL, 0xE0C4 , "MOZ_CRASH",
9090+ "Hit MOZ_CRASH(%{public}s), at %{public}s:%{public}d\n",
9191+ aStr, aFilename, aLine);
9292 #else
@@ -116,7 +116,7 @@ index 3247b993c..c7039d5f8 100644
116116+ #if defined(ANDROID)
117117 __android_log_print(ANDROID_LOG_INFO, "Gecko", "%s", s.str().c_str());
118118+ #elif defined(OHOS)
119- + (void) OH_LOG_Print(LOG_APP, LOG_INFO, 0 , "Gecko", "%{public}s\n", s.str().c_str());
119+ + (void) OH_LOG_Print(LOG_APP, LOG_INFO, 0xE0C4 , "Gecko", "%{public}s\n", s.str().c_str());
120120 #else
121121 fputs(s.str().c_str(), stderr);
122122 #endif
@@ -143,7 +143,7 @@ index c3a2ca89e..3fea33f4b 100644
143143 }
144144+ #elif defined(OHOS)
145145+ MFBT_API void vprintf_stderr(const char* aFmt, va_list aArgs) {
146- + (void) OH_LOG_Print(LOG_APP, LOG_INFO, 0 , "Gecko", aFmt, aArgs);
146+ + (void) OH_LOG_Print(LOG_APP, LOG_INFO, 0xE0C4 , "Gecko", aFmt, aArgs);
147147+ }
148148 #elif defined(FUZZING_SNAPSHOT)
149149 MFBT_API void vprintf_stderr(const char* aFmt, va_list aArgs) {
@@ -194,7 +194,7 @@ index 52bd6abc5..781402d56 100644
194194+ if (fd == _pr_stderr) { \
195195+ char savebyte = buf[nb]; \
196196+ buf[nb] = '\0'; \
197- + (void) OH_LOG_Print(LOG_APP, LOG_INFO, 0 , "PRLog", \
197+ + (void) OH_LOG_Print(LOG_APP, LOG_INFO, 0xE0C4 , "PRLog", \
198198+ "%{public}s\n", buf); \
199199+ buf[nb] = savebyte; \
200200+ } else { \
@@ -209,7 +209,7 @@ index 52bd6abc5..781402d56 100644
209209 #ifdef ANDROID
210210 __android_log_write(ANDROID_LOG_ERROR, "PRLog", "Aborting");
211211+ #elif defined(OHOS)
212- + (void) OH_LOG_Print(LOG_APP, LOG_ERROR, 0 , "PRLog", "Aborting\n");
212+ + (void) OH_LOG_Print(LOG_APP, LOG_ERROR, 0xE0C4 , "PRLog", "Aborting\n");
213213 #endif
214214 abort();
215215 }
@@ -218,7 +218,7 @@ index 52bd6abc5..781402d56 100644
218218 __android_log_assert(NULL, "PRLog", "Assertion failure: %s, at %s:%d\n",
219219 s, file, ln);
220220+ #elif defined(OHOS)
221- + (void) OH_LOG_Print(LOG_APP, LOG_ERROR, 0 , "PRLog",
221+ + (void) OH_LOG_Print(LOG_APP, LOG_ERROR, 0xE0C4 , "PRLog",
222222+ "Assertion failure: %{public}s, at %{public}s:%{public}d\n",s, file, ln);
223223 #endif
224224 abort();
0 commit comments