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

refactor(core): simplify Deno.core initialisation, remove stale TODO #8847

Merged
merged 9 commits into from
Jan 5, 2021

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Dec 21, 2020

This commit rewrites initialisation of the "shared queue" and
in effect prevents from double execution of "core/core.js" and
"core/error.js".

Previously both of these files were executed every time a "JsRuntime"
was created. That lead to a situation where one copy of each script
was included in the snapshot and then another copy would be
executed after loading the snapshot.

Effectively "JsRuntime::shared_init" was removed; instead execution
of those scripts and actual initialisation of shared queue
was split into two helper functions: "JsRuntime::js_init" and
"JsRuntime::share_queue_init".

Additionally stale TODO comments were removed.

@bartlomieju bartlomieju changed the title [WIP] refactor(core): cleanup refactor(core): simplify Deno.core initialisation, remove stale TODO Dec 22, 2020
@bartlomieju bartlomieju requested a review from ry December 22, 2020 20:24
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju
Copy link
Member Author

Hit a problem with inspector no longer working, closing for now, I might revisit in the future.

@bartlomieju bartlomieju reopened this Jan 4, 2021
@bartlomieju bartlomieju requested a review from ry January 4, 2021 18:40
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 46c0cab into denoland:master Jan 5, 2021
@bartlomieju bartlomieju deleted the cleanup_core branch January 5, 2021 21:10
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.

None yet

2 participants