Null pointer crash when loading module with unresolved import also as a script file
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2017 16:57:11 +0000 (16:57 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2017 16:57:11 +0000 (16:57 +0000)
commit49d7b91eef53fdb97eb65b921d82847415f2d550
tree01310ad8f24e234ffc120d7eb951016c9d384888
parente83c52f3cebff105cad87a73b0b56a479d683698
Null pointer crash when loading module with unresolved import also as a script file
https://bugs.webkit.org/show_bug.cgi?id=168971

Reviewed by Saam Barati.

JSTests:

* stress/re-execute-error-module.js: Added.
(shouldBe):
(async):
* stress/resources/error-module.js: Added.

Source/JavaScriptCore:

If linking throws an error, this error should be re-thrown
when requesting the same module.

* builtins/ModuleLoaderPrototype.js:
(globalPrivate.newRegistryEntry):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::link):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/re-execute-error-module.js [new file with mode: 0644]
JSTests/stress/resources/error-module.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js
Source/JavaScriptCore/runtime/JSModuleRecord.cpp