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

[jsfm] Enhance the multi-instance isolation (sandbox) #960

Closed
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@Hanks10100
Contributor

Hanks10100 commented Dec 28, 2017

According to the discussion in the mailing list (Use multi-context for Weex page), the current isolation strategy is vulnerable, distinguish the "Global Context" and the "Instance Context" is a more reasonable solution.

In practice, the logic of instance management and code execution will be moved from js framework to native render engines.

This PR implement a new createInstanceContext API instead of the former createInstance to create the instance context for each page. Refer to this PR to see the modification in the Vue.js framework. Rax doesn't support it yet.

As for native render engines, they should also call createInstanceContext instead of createInstance, and parse the bundle type of the code (Vue or Rax) and then send it to js framework.

Hanks10100 added some commits Dec 28, 2017

* [jsfm] upgrade vue and rax
upgrade weex-vue-framework to 2.5.11-weex.1
upgrade weex-rax-framework to 0.4.20
* [jsfm] enhance the multi-instance isolation (sandbox)
Use "createInstanceContext" instead of "createInstance".
JS Framework only needs to prepare the instance context and no longer
execute the js code. The js code will be executed by native.
This *sandbox* feature requires native to cooperate to achieve.
@weex-bot

This comment has been minimized.

weex-bot commented Dec 28, 2017

Messages
📖 android test finished.

Generated by 🚫 dangerJS

@Hanks10100 Hanks10100 closed this Dec 28, 2017

@Hanks10100 Hanks10100 reopened this Dec 28, 2017

@Hanks10100

This comment has been minimized.

Contributor

Hanks10100 commented Dec 28, 2017

@yacheng @acton393 @yuhun-alibaba Please take a review.

Hanks10100 added some commits Dec 29, 2017

@yuhun-alibaba

good work

@asfgit asfgit closed this in dc42844 Dec 29, 2017

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