[beast: 12/70] V8BSE: export bse.server object
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 12/70] V8BSE: export bse.server object
- Date: Tue, 28 Mar 2017 23:22:43 +0000 (UTC)
commit 7bb431e32711ee0990ead80a685664a7defc11d1
Author: Tim Janik <timj gnu org>
Date: Sat Feb 18 02:01:50 2017 +0100
V8BSE: export bse.server object
Signed-off-by: Tim Janik <timj gnu org>
ebeast/v8bse/nodemodule.cc | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/ebeast/v8bse/nodemodule.cc b/ebeast/v8bse/nodemodule.cc
index 1a3aff0..5e31477 100644
--- a/ebeast/v8bse/nodemodule.cc
+++ b/ebeast/v8bse/nodemodule.cc
@@ -52,6 +52,12 @@ v8bse_register_module (v8::Local<v8::Object> exports)
v8::Local<v8::Object> module_instance = bse_v8stub->module_.new_instance();
v8::Maybe<bool> ok = exports->SetPrototype (context, module_instance);
assert (ok.FromJust() == true);
+
+ // export server handle
+ V8ppType_BseServer &class_ = bse_v8stub->BseServer_class_;
+ v8::Local<v8::Object> v8_server = class_.import_external (isolate, new Bse::ServerH (bse_server));
+ module_instance->DefineOwnProperty (context, v8pp::to_v8 (isolate, "server"),
+ v8_server, v8::PropertyAttribute (v8::ReadOnly | v8::DontDelete));
}
// node.js registration
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]