Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
819ff1a
deps: cherry-pick 46c4979e86 from upstream v8
bnoordhuis Feb 21, 2018
62dc43d
src: clean up process.dlopen()
bnoordhuis Feb 22, 2018
86fa308
src: make process.dlopen() load well-known symbol
bnoordhuis Feb 22, 2018
6bd8c10
build: fix gocvr version used for coverage
mhdawson Mar 2, 2018
a3b9542
module: fix cyclical dynamic import
bmeck Feb 23, 2018
57ddfd1
doc: add simple example to rename function
punteek Feb 16, 2018
6ad9be0
doc: new team for bundlers or delivery of Node.js
mhdawson Mar 2, 2018
dc25929
deps: cherry-pick 0bcb1d6f from upstream V8
jakobkummerow Dec 5, 2017
d268061
doc: add introduced_in metadata to _toc.md
Trott Mar 4, 2018
15281b0
doc: update cc list
BridgeAR Mar 2, 2018
83c912a
doc: remove tentativeness in pull-requests.md
Trott Mar 4, 2018
7861df9
doc: remove subsystem from pull request template
Trott Mar 4, 2018
d6153e9
src: refactor GetPeerCertificate
danbev Mar 2, 2018
0b22bab
src: use std::unique_ptr for STACK_OF(X509)
bnoordhuis Mar 2, 2018
7448712
test: move require http2 to after crypto check
danbev Mar 3, 2018
4829469
src: #include <stdio.h>" to iculslocs
srl295 Mar 5, 2018
c89e8f3
perf_hooks: fix timing
TimothyGu Feb 25, 2018
c81a391
test: add more information to assert.strictEqual
ryzokuken Mar 6, 2018
03784d7
src: handle exceptions in env->SetImmediates
jasnell Jan 26, 2018
6e1bed1
src: prevent persistent handle resource leaks
bnoordhuis Feb 21, 2018
5b4eeb8
src: remove unnecessary Reset() calls
bnoordhuis Feb 21, 2018
d3eaf77
src: don't touch js object in Http2Session dtor
bnoordhuis Feb 21, 2018
4e9ac10
http2: no stream destroy while its data is on the wire
addaleax Feb 26, 2018
462dff2
doc: fix/add link to Android info
vsemozhetbyt Feb 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
module: fix cyclical dynamic import
ensures that instantiation result is only used during initial loading

PR-URL: #18965
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
bmeck authored and MylesBorins committed Mar 6, 2018
commit a3b95428d5d1113bcc548b5a46700cc57239158d
7 changes: 4 additions & 3 deletions lib/internal/loader/ModuleJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ class ModuleJob {
}

async instantiate() {
if (this.instantiated) {
return this.instantiated;
if (!this.instantiated) {
return this.instantiated = this._instantiate();
}
return this.instantiated = this._instantiate();
await this.instantiated;
return this.module;
}

// This method instantiates the module associated with this job and its
Expand Down
3 changes: 3 additions & 0 deletions test/es-module/test-esm-cyclic-dynamic-import.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Flags: --experimental-modules
import '../common';
import('./test-esm-cyclic-dynamic-import');