Closed
Bug 1508672
Opened 6 years ago
Closed 6 years ago
Enable test262 dynamic module import tests and fix failures
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(5 files)
514.46 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
6.88 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
3.35 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
5.12 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
2.86 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
As pointed out in bug 1342012, there are now a bunch of test262 tests for this.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jcoppeard
Assignee | ||
Comment 1•6 years ago
|
||
Remove the 'skip' keyword for test262 dynamic import tests and add those that fail to jstests.list.
Attachment #9027143 -
Flags: review?(jorendorff)
Assignee | ||
Comment 2•6 years ago
|
||
The parser currently accepts |new import()| which is wrong because import() is not a MemberExpression. The patch fixes this by passing allowCallSyntax into importExpr().
Attachment #9027160 -
Flags: review?(jorendorff)
Assignee | ||
Comment 3•6 years ago
|
||
Patch to fix a couple of minor issues in the tests themselves: - indirect-resolution-1_FIXTURE.js has a bare import specifier. This should be a relative specifier to find the indirect-resolution-2_FIXTURE.js module. - default-property-not-set-own.js is not a module but imports itself as a module and so gets run twice. When this happens $DONE complains about being called twice. I also made a pull request for these changes: https://github.com/tc39/test262/pull/1965
Attachment #9027164 -
Flags: review?(jorendorff)
Assignee | ||
Comment 4•6 years ago
|
||
The spec says that success and failure actions for dynamic import must happen 'at some future time', but the shell module loader executes them immediately. This allows a dynamic import to observe a module that is still in the evaluating state, which causes an assertion failure. The patch uses a promise to defer these actions.
Attachment #9027167 -
Flags: review?(jorendorff)
Assignee | ||
Comment 5•6 years ago
|
||
Finally, the shell abortDynamicModuleImport() function used by the shell module loader assumes that only ErrorObjects will be thrown, causing tests that throw other values to fail. The patch removes this restriction.
Attachment #9027171 -
Flags: review?(jorendorff)
Updated•6 years ago
|
Attachment #9027143 -
Flags: review?(jorendorff) → review+
Comment 6•6 years ago
|
||
Comment on attachment 9027160 [details] [diff] [review] bug1508672-new-import-syntax-error Review of attachment 9027160 [details] [diff] [review]: ----------------------------------------------------------------- Nice!
Attachment #9027160 -
Flags: review?(jorendorff) → review+
Updated•6 years ago
|
Attachment #9027164 -
Flags: review?(jorendorff) → review+
Updated•6 years ago
|
Attachment #9027167 -
Flags: review?(jorendorff) → review+
Comment 7•6 years ago
|
||
Comment on attachment 9027171 [details] [diff] [review] bug1508672-exception-values Review of attachment 9027171 [details] [diff] [review]: ----------------------------------------------------------------- You sure make it look easy. :)
Attachment #9027171 -
Flags: review?(jorendorff) → review+
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/761da392dd7a Enable passing test262 dynamic import tests r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/0ee93898e415 Make |new import()| a syntax error r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/93445c302752 Fix some minor test262 issues in dynamic import tests r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/46ce47bd3368 Finish dynamic module import at a later time in the shell r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/9363b52649ac Dynamically imported modules can throw any value as an exception r=jorendorff
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/761da392dd7a https://hg.mozilla.org/mozilla-central/rev/0ee93898e415 https://hg.mozilla.org/mozilla-central/rev/93445c302752 https://hg.mozilla.org/mozilla-central/rev/46ce47bd3368 https://hg.mozilla.org/mozilla-central/rev/9363b52649ac
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•