summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
authorInteon <42113979+inteon@users.noreply.github.com>2021-03-18 14:10:27 +0100
committerGitHub <noreply@github.com>2021-03-18 14:10:27 +0100
commit20627c91364d2a992fdfaaad7c8ae86454dbc2ed (patch)
treeacef1a279e92fe072da2cce2178889f6124c47c7 /runtime/js/99_main.js
parent0e70d9e59bc0e70f1921bb217ee00fc2e6facb69 (diff)
refactor: update minimal ops & rename to buffer ops (#9719)
This commit rewrites "dispatch_minimal" into "dispatch_buffer". It's part of an effort to unify JS interface for ops for both json and minimal (buffer) ops. Before this commit "minimal ops" could be either sync or async depending on the return type from the op, but this commit changes it to have separate signatures for sync and async ops (just like in case of json ops).
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index d96aaaaae..233c5cd43 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -11,7 +11,6 @@ delete Object.prototype.__proto__;
const eventTarget = window.__bootstrap.eventTarget;
const globalInterfaces = window.__bootstrap.globalInterfaces;
const location = window.__bootstrap.location;
- const dispatchMinimal = window.__bootstrap.dispatchMinimal;
const build = window.__bootstrap.build;
const version = window.__bootstrap.version;
const errorStack = window.__bootstrap.errorStack;
@@ -142,12 +141,7 @@ delete Object.prototype.__proto__;
}
function runtimeStart(runtimeOptions, source) {
- const opsMap = core.ops();
- for (const [name, opId] of Object.entries(opsMap)) {
- if (name === "op_write" || name === "op_read") {
- core.setAsyncHandler(opId, dispatchMinimal.asyncMsgFromRust);
- }
- }
+ core.ops();
core.setMacrotaskCallback(timers.handleTimerMacrotask);
version.setVersions(