mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
Rename msg_from_js() to dispatch().
This commit is contained in:
parent
d38c4e0ff1
commit
51dc46eff4
2 changed files with 6 additions and 2 deletions
|
@ -56,7 +56,7 @@ impl log::Log for Logger {
|
||||||
fn main() {
|
fn main() {
|
||||||
log::set_logger(&LOGGER).unwrap();
|
log::set_logger(&LOGGER).unwrap();
|
||||||
let args = env::args().collect();
|
let args = env::args().collect();
|
||||||
let mut isolate = isolate::Isolate::new(args, ops::msg_from_js);
|
let mut isolate = isolate::Isolate::new(args, ops::dispatch);
|
||||||
flags::process(&isolate.state.flags);
|
flags::process(&isolate.state.flags);
|
||||||
tokio_util::init(|| {
|
tokio_util::init(|| {
|
||||||
isolate
|
isolate
|
||||||
|
|
|
@ -50,7 +50,11 @@ fn empty_buf() -> Buf {
|
||||||
Box::new([])
|
Box::new([])
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn msg_from_js(
|
/// Processes raw messages from JavaScript.
|
||||||
|
/// This functions invoked every time libdeno.send() is called.
|
||||||
|
/// control corresponds to the first argument of libdeno.send().
|
||||||
|
/// data corresponds to the second argument of libdeno.send().
|
||||||
|
pub fn dispatch(
|
||||||
isolate: &mut Isolate,
|
isolate: &mut Isolate,
|
||||||
control: &[u8],
|
control: &[u8],
|
||||||
data: &'static mut [u8],
|
data: &'static mut [u8],
|
||||||
|
|
Loading…
Add table
Reference in a new issue