Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Commit bdac05e

Browse files
committed
src: fix build
1 parent 0a55d6d commit bdac05e

File tree

3 files changed

+12
-28
lines changed

3 files changed

+12
-28
lines changed

node.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
'lib/internal/v8_prof_polyfill.js',
172172
'lib/internal/v8_prof_processor.js',
173173
'lib/internal/validators.js',
174+
'lib/internal/vm/source_text_module.js',
174175
'lib/internal/stream_base_commons.js',
175176
'lib/internal/worker.js',
176177
'lib/internal/streams/lazy_transform.js',

src/module_wrap.cc

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -443,30 +443,6 @@ inline bool ShouldBeTreatedAsRelativeOrAbsolutePath(
443443
return false;
444444
}
445445

446-
std::string ReadFile(uv_file file) {
447-
std::string contents;
448-
uv_fs_t req;
449-
char buffer_memory[4096];
450-
uv_buf_t buf = uv_buf_init(buffer_memory, sizeof(buffer_memory));
451-
int r;
452-
453-
do {
454-
r = uv_fs_read(uv_default_loop(),
455-
&req,
456-
file,
457-
&buf,
458-
1,
459-
contents.length(), // offset
460-
nullptr);
461-
uv_fs_req_cleanup(&req);
462-
463-
if (r <= 0)
464-
break;
465-
contents.append(buf.base, r);
466-
} while (true);
467-
return contents;
468-
}
469-
470446
enum CheckFileOptions {
471447
LEAVE_OPEN_AFTER_CHECK,
472448
CLOSE_AFTER_CHECK
@@ -536,10 +512,6 @@ Maybe<URL> ResolveExtensions(const URL& search) {
536512
return Nothing<URL>();
537513
}
538514

539-
inline Maybe<URL> ResolveIndex(const URL& search) {
540-
return ResolveExtensions<ONLY_VIA_EXTENSIONS>(URL("index", search));
541-
}
542-
543515
Maybe<URL> ResolveModule(Environment* env,
544516
const std::string& specifier,
545517
const URL& base) {

src/module_wrap.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
namespace node {
1313
namespace loader {
1414

15+
enum ScriptType : int {
16+
kScript,
17+
kModule,
18+
};
19+
20+
enum HostDefinedOptions : int {
21+
kType = 8,
22+
kID = 9,
23+
kLength = 10,
24+
};
25+
1526
v8::Maybe<url::URL> Resolve(Environment* env,
1627
const std::string& specifier,
1728
const url::URL& base);

0 commit comments

Comments
 (0)