Skip to content

Commit

Permalink
try to fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Mar 15, 2019
1 parent 39e55e7 commit 07f0740
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions core/BUILD.gn
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions core/isolate.rs
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 07f0740

Please sign in to comment.