From 00597ffde1ebb05a6c60ea7e09e6578c11f92820 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 30 Jan 2019 17:21:31 -0500 Subject: Refactor libdeno ES module interface. (#1624) Allows for future asynchronous module loading. Add support for import.meta.url Fixes #1496 --- libdeno/api.cc | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'libdeno/api.cc') diff --git a/libdeno/api.cc b/libdeno/api.cc index 1c62cdd5a..af3c4b215 100644 --- a/libdeno/api.cc +++ b/libdeno/api.cc @@ -80,7 +80,6 @@ deno::DenoIsolate* unwrap(Deno* d_) { deno_buf deno_get_snapshot(Deno* d_) { auto* d = unwrap(d_); CHECK_NE(d->snapshot_creator_, nullptr); - CHECK(d->resolve_module_.IsEmpty()); d->ClearModules(); d->context_.Reset(); @@ -126,20 +125,6 @@ int deno_execute(Deno* d_, void* user_data, const char* js_filename, return deno::Execute(context, js_filename, js_source) ? 1 : 0; } -int deno_execute_mod(Deno* d_, void* user_data, const char* js_filename, - const char* js_source, int resolve_only) { - auto* d = unwrap(d_); - deno::UserDataScope user_data_scope(d, user_data); - auto* isolate = d->isolate_; - v8::Locker locker(isolate); - v8::Isolate::Scope isolate_scope(isolate); - v8::HandleScope handle_scope(isolate); - auto context = d->context_.Get(d->isolate_); - CHECK(!context.IsEmpty()); - return deno::ExecuteMod(context, js_filename, js_source, resolve_only) ? 1 - : 0; -} - int deno_respond(Deno* d_, void* user_data, int32_t req_id, deno_buf buf) { auto* d = unwrap(d_); if (d->current_args_ != nullptr) { @@ -210,9 +195,4 @@ void deno_terminate_execution(Deno* d_) { deno::DenoIsolate* d = reinterpret_cast(d_); d->isolate_->TerminateExecution(); } - -void deno_resolve_ok(Deno* d_, const char* filename, const char* source) { - deno::DenoIsolate* d = reinterpret_cast(d_); - d->ResolveOk(filename, source); -} } -- cgit v1.2.3