Skip to content
Permalink
Browse files

try to fix windows

  • Loading branch information...
ry committed Mar 15, 2019
1 parent 05fdaf9 commit 2f5ee3ac3465cd22f1790b3c0ddf57b271f7f0f8
Showing with 6 additions and 3 deletions.
  1. +3 −0 core/BUILD.gn
  2. +3 −3 core/isolate.rs
@@ -16,6 +16,9 @@ main_extern = [
"$rust_build:serde_json",
"$rust_build:log",
]
if (is_win) {
main_extern += [ "$rust_build:winapi" ]
}

rust_crate("deno_core") {
source_root = "lib.rs"
@@ -131,14 +131,11 @@ impl<B: Behavior> Isolate<B> {

let (is_sync, op) = if control_argv0.len() > 0 {
// The user called libdeno.send(control)
assert!(control_shared.is_none());
isolate
.behavior
.dispatch(control_argv0.as_ref(), zero_copy_buf)
} else if let Some(c) = control_shared {
// The user called Deno._sharedQueue.push(control)
// At this point the SharedQueue should be empty.
assert!(isolate.shared.shift().is_none());
isolate.behavior.dispatch(&c, zero_copy_buf)
} else {
// The sharedQueue is empty. The shouldn't happen usually, but it's also
@@ -149,6 +146,9 @@ impl<B: Behavior> Isolate<B> {
return;
};

// At this point the SharedQueue should be empty.
assert_eq!(isolate.shared.size(), 0);

if is_sync {
let res_record = op.wait().unwrap();
let push_success = isolate.shared.push(res_record);

0 comments on commit 2f5ee3a

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.