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

add v8 optional on macOS #1515

Merged
merged 4 commits into from Sep 26, 2018

Conversation

Projects
None yet
3 participants
@drelaptop
Collaborator

drelaptop commented Sep 25, 2018

为 mac 平台 ScriptEngine 增加 v8 可选 , for cocos-creator/2d-tasks#418

目前默认依旧为 JSC,通过改变 js-bindings/jswrapper/config.hpp 中的宏定义,可将引擎切换为 v8。

  • 依赖:第三方库更改:cocos-creator/cocos2d-x-lite-external#60
  • 测试:使用 creator 2.1 在 mac 上切换为 v8,可以正常跑起来
  • 存在问题:在 chrome 上 debug 无法命中断点,(通过 debugger 方式可以命中)
#if defined(__APPLE__)
    #define SCRIPT_ENGINE_TYPE           SCRIPT_ENGINE_JSC	    #include <TargetConditionals.h>
    #if TARGET_OS_OSX
        #define SCRIPT_ENGINE_TYPE           SCRIPT_ENGINE_JSC // SCRIPT_ENGINE_V8 optional on 
        ...

补充:验证在 Chrome 68.0.3440.84 (64-bit) 上可以正常调试 ,Chrome 69 断点命中失败

验证 Android 平台原生,也是 Chrome 68 可以调试,69 不可以

@drelaptop drelaptop requested review from wuzhiming and minggo Sep 25, 2018

@minggo minggo merged commit 0450316 into cocos-creator:develop Sep 26, 2018

@minggo

This comment has been minimized.

@minggo

This comment has been minimized.

Contributor

minggo commented Sep 26, 2018

额,这个是要在哪个版本?不是加到 2.1 吗?

@drelaptop

This comment has been minimized.

Collaborator

drelaptop commented Sep 26, 2018

现在 lite 的 develop 分支和 2.1 分支差异比较小,放到 develop 分支的话,要往 2.1 同步会比较容易。不想合到 2.1 的话,就不用动,这个 @jareguo 来看看

@caochao

This comment has been minimized.

caochao commented Nov 29, 2018

ios不能用v8吗?

@drelaptop

This comment has been minimized.

Collaborator

drelaptop commented Nov 29, 2018

不包括,包括的话应该叫 Apple 平台

如果你能自己编译出 v8 的 iOS 版,也可以用类似的方式切换

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment