Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add id() method
  • Loading branch information
coolreader18 committed Apr 7, 2019
commit 5afc5585648b8faf8661269a8bc7442a2adf0245
7 changes: 7 additions & 0 deletions wasm/lib/src/vm_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ impl StoredVirtualMachine {
held_objects: RefCell::new(Vec::new()),
}
}

pub fn id(&self) -> &str {
self.vm
.wasm_id
.as_ref()
.expect("VirtualMachine inside of WASM crate should have wasm_id set")
}
}

// It's fine that it's thread local, since WASM doesn't even have threads yet. thread_local!
Expand Down