Changeset 213452 in webkit
- Timestamp:
- Mar 6, 2017 8:57:11 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r213313 r213452 1 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 Null pointer crash when loading module with unresolved import also as a script file 4 https://bugs.webkit.org/show_bug.cgi?id=168971 5 6 Reviewed by Saam Barati. 7 8 * stress/re-execute-error-module.js: Added. 9 (shouldBe): 10 (async): 11 * stress/resources/error-module.js: Added. 12 1 13 2017-03-02 Keith Miller <keith_miller@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r213450 r213452 1 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 Null pointer crash when loading module with unresolved import also as a script file 4 https://bugs.webkit.org/show_bug.cgi?id=168971 5 6 Reviewed by Saam Barati. 7 8 If linking throws an error, this error should be re-thrown 9 when requesting the same module. 10 11 * builtins/ModuleLoaderPrototype.js: 12 (globalPrivate.newRegistryEntry): 13 * runtime/JSModuleRecord.cpp: 14 (JSC::JSModuleRecord::link): 15 1 16 2017-03-06 Yusuke Suzuki <utatane.tea@gmail.com> 2 17 -
trunk/Source/JavaScriptCore/builtins/ModuleLoaderPrototype.js
r211018 r213452 93 93 key: key, 94 94 state: @ModuleFetch, 95 metadata: @undefined,96 95 fetch: @undefined, 97 96 instantiate: @undefined, … … 100 99 dependenciesMap: @undefined, 101 100 module: @undefined, // JSModuleRecord 102 error: @undefined, 101 linkError: @undefined, 102 linkSucceeded: true, 103 103 }; 104 104 } … … 351 351 "use strict"; 352 352 353 // FIXME: Current implementation does not support optionalInstance. 354 // So Link's step 3 is skipped. 355 // https://bugs.webkit.org/show_bug.cgi?id=148171 356 353 if (!entry.linkSucceeded) 354 throw entry.linkError; 357 355 if (entry.state === @ModuleReady) 358 356 return; 359 357 @setStateToMax(entry, @ModuleReady); 360 358 361 // Since we already have the "dependencies" field, 362 // we can call moduleDeclarationInstantiation with the correct order 363 // without constructing the dependency graph by calling dependencyGraph. 364 var dependencies = entry.dependencies; 365 for (var i = 0, length = dependencies.length; i < length; ++i) { 366 var pair = dependencies[i]; 367 this.link(pair.value.registryEntry, fetcher); 368 } 369 370 this.moduleDeclarationInstantiation(entry.module, fetcher); 359 try { 360 // Since we already have the "dependencies" field, 361 // we can call moduleDeclarationInstantiation with the correct order 362 // without constructing the dependency graph by calling dependencyGraph. 363 var dependencies = entry.dependencies; 364 for (var i = 0, length = dependencies.length; i < length; ++i) { 365 var pair = dependencies[i]; 366 this.link(pair.value.registryEntry, fetcher); 367 } 368 369 this.moduleDeclarationInstantiation(entry.module, fetcher); 370 } catch (error) { 371 entry.linkSucceeded = false; 372 entry.linkError = error; 373 throw error; 374 } 371 375 } 372 376 -
trunk/Source/JavaScriptCore/runtime/JSModuleRecord.cpp
r211247 r213452 87 87 return; 88 88 } 89 instantiateDeclarations(exec, executable); 90 RETURN_IF_EXCEPTION(scope, void()); 89 91 m_moduleProgramExecutable.set(vm, this, executable); 90 instantiateDeclarations(exec, executable);91 92 } 92 93
Note: See TracChangeset
for help on using the changeset viewer.