Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.8 Support openharmony4.0 #15708

Merged
merged 6 commits into from
Jul 13, 2023
Merged

v3.8 Support openharmony4.0 #15708

merged 6 commits into from
Jul 13, 2023

Conversation

qiuguohua
Copy link
Contributor

@qiuguohua qiuguohua commented Jul 13, 2023

Re: #

Changelog

Deveco3.1.0.501 supports openharmony 3.x, supports openharmony4.x with harmonyos.


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@github-actions
Copy link

Interface Check Report

This pull request does not change any public interfaces !

@qiuguohua qiuguohua requested a review from minggo July 13, 2023 07:07
},
"targets": [
{
"name": "default"
"name": "default",
"runtimeOS": "HarmonyOS"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must use the harmonyos runtime environment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems wired.

@@ -211,6 +211,12 @@ for (const key in jsbWindow) {
}
}

// In the openharmony platform, XMLHttpRequest is not undefined, but there are problems to using it.
// So the native implementation is forced to be used.
if (window.oh && globalThis.XMLHttpRequest != undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (window.oh && globalThis.XMLHttpRequest != undefined) {
if (window.oh && typeof globalThis.XMLHttpRequest !== 'undefined') {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it mean XMLHttpRequest is supported on openharmony

but there are some bugs on their XMLHttpRequest implementation ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Openharmony team says it doesn't provide an XMLHttpRequest interface, but XMLHttpRequest isn't undefined. there are problems with using it.

Copy link
Contributor

@PPpro PPpro Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that means we keep two different implementation of XMLHttpRequest, it's strange

where the globalThis.XMLHttpRequest comes from ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can create an issue for it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please setup an issue to figure out where the globalThis.XMLHttpRequest is defined

},
"targets": [
{
"name": "default"
"name": "default",
"runtimeOS": "HarmonyOS"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the OS is OpenHarmony?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a bug that is not available to environments using Openharmony. We can only use harmonyos.

Restore default values
@qiuguohua qiuguohua requested a review from PPpro July 13, 2023 07:34
// So the native implementation is forced to be used.
if (window.oh && typeof globalThis.XMLHttpRequest !== 'undefined') {
globalThis.XMLHttpRequest = jsbWindow.XMLHttpRequest;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How other native platforms set globalThis.XMLHttpRequest?

@minggo minggo merged commit 39c57f0 into cocos:v3.8.0 Jul 13, 2023
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants