-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove useless setParent call and related condition. #4585
Conversation
/cc @akroshg |
Small extra comment on this - additional to not doing anything useful this extra setParent command generated noise that made debugging some of the recently fixed module issues harder than it would otherwise have been. |
This seems to be fine with me - although I'd ask @boingoing for the confirmation. |
@boingoing please could you take a look when you have a minute? This code is a rather annoying noise generator. |
Sounds reasonable to me. Can we assert here that the child module has parent set to the referencing module? |
We should not assert here - it will fail. The child module record should never have a parent set at this point - this is the first of the two places it's currently set (and it's the wrong one.) Steps in process:
Setting the parent in JsInitialiseModuleRecord is premature as it's about to be set within ResolveExternalModuleDependencies. Additionally as the dependency handling is all done with un-normalised specifiers whereas this set in JsInitialiseModuleRecord is done with a normalised specifier it therefore results in doubling up - as the two names may well not be the same. |
Alright, I see what you mean. Seems fine to me. |
@boingoing let me know if this should be rebased to master and/or if you want me to do anything else with it. |
This change should retarget master. 👍 |
@boingoing I've rebased to master and updated. please let me know if you'd like me to do anything else with this. |
I will do some internal testing and pull in the change. 👍 |
…ition. Merge pull request #4585 from rhuanjl:setparent Follow up to issue: #3638 The issue was already fixed by removing the unnecessary assert: #4548 But - it highlighted another small issue. The setParent call in JsrtCore is useless - it results in several operations all of which have no useful end result. (No test case included as this doesn't fix a bug it just removes useless code)
Follow up to issue: #3638
The issue was already fixed by removing the unnecessary assert:
#4548
But - it highlighted another small issue. The setParent call in JsrtCore is useless - it results in several operations all of which have no useful end result.
(No test case included as this doesn't fix a bug it just removes useless code)