Skip to content

Commit

Permalink
Fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuguohua committed Nov 18, 2024
1 parent 6940298 commit a4f8e03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion native/cocos/bindings/manual/JavaScriptArkTsBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool JavaScriptArkTsBridge::CallInfo::execute(se::Value& rval) {
napi_value result;
char* module_info = __getModuleInfo(module_name);
status = napi_load_module_with_info(env, _clsPath, module_info, &result);
delete module_info;
free(module_info);
module_info = nullptr;
if (status != napi_ok) {
CC_LOG_WARNING("callNativeMethod napi_load_module_with_info fail, status=%{public}d", status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface context {
nativeEngineStart: () => void;
onTextChange: (param: string) => void;
onComplete: (param: string) => void;
onConfirm: (param: string) => void;
shouldStartLoading: (viewTag: number, url: string) => void;
finishLoading: (viewTag: number, url: string) => void;
failLoading: (viewTag: number, url: string) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export enum ContextType {
EDITBOX_UTILS,
WEBVIEW_UTILS,
SYSTEM_UTILS,
DISPLAY_UTILS,
UV_ASYNC_SEND,
VIDEO_UTILS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ import { launchEngine } from '../cocos/game';
<% } %>
import { PortProxy } from '../common/PortProxy';

globalThis.oh = globalThis.oh || {};
<% if(useV8) { %>
globalThis.importPolyfill = async function () {
await import('../cocos/oh-adapter/sys-ability-polyfill.js');
}
globalThis.importPolyfill();
globalThis.oh = {};
<% } %>

if (!(console as any).assert) {
(console as any).assert = function(cond, msg) {
Expand Down

0 comments on commit a4f8e03

Please sign in to comment.