h8 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -14
- data/ext/h8/h8.cpp +1 -2
- data/ext/h8/js_gate.h +12 -1
- data/ext/h8/main.cpp +1 -1
- data/lib/h8/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7384caa28f422353e348519ea0f56f9869f8243f
|
4
|
+
data.tar.gz: ef389e8693081cf4c7173bbffd31e2127bcf978e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef76e195a1db60ca07987b46e5060830a73221c7e45daaf8e4fa8b8a8ab7540a25ed1f65740421cddeb19936d3abf8cd24f1a5ea5911292402c1f7b90b366875
|
7
|
+
data.tar.gz: 171b71959ebba1159e62c771a8f529d648307667770dbda0c03bfdaa106abb45c293bd5b7781ff9258abf286886d4e300ae20cc09bb875c6001861a033a784bc
|
data/README.md
CHANGED
@@ -38,19 +38,9 @@ uncaught javascript exceptions raise ruby error in ruby code.
|
|
38
38
|
|
39
39
|
## Main difference from therubyracer/features not ready
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- H8 is thread safe (users Lockers) but script is executed in the calling ruby thread without
|
46
|
-
releasing gvl (other ruby threads can not perform on this core while javascript code runs).
|
47
|
-
|
48
|
-
The same performance reason. If we release gvl on script start and reacquire it every time the ruby
|
49
|
-
object, callback, class, whatever is referenced from JS, the execution will considerably degrade. As
|
50
|
-
this gem is intended to let javascript/coffescript tightly integrate with ruby objects we have
|
51
|
-
decided to not to slow down everything. If it is a problem, lets discuss it.
|
52
|
-
|
53
|
-
- correct and accurate object tracking in both JS and Ruby VMs, GC aware.
|
41
|
+
- H8 is thread safe (uses Lockers) but script is executed in the calling ruby thread without
|
42
|
+
releasing gvl (other ruby threads can not perform on this core while javascript code runs). We are
|
43
|
+
working on it, as simply releasing GVL and reacquring it may degrade performance.
|
54
44
|
|
55
45
|
- labmda/proc passed as var to the context **does not receives first (this) argument
|
56
46
|
automatically!**
|
@@ -76,7 +66,7 @@ when such a lambda needs javascript's this - but, no problem, pass it this, or w
|
|
76
66
|
you need ;)
|
77
67
|
|
78
68
|
- there is no 'Context object initialization' - it does not work well in rubyracer so it is not
|
79
|
-
likely used widely. We can add it later, though.
|
69
|
+
likely used widely. We can add it later, though - if you need it, add an issue.
|
80
70
|
|
81
71
|
|
82
72
|
|
data/ext/h8/h8.cpp
CHANGED
data/ext/h8/js_gate.h
CHANGED
@@ -184,6 +184,11 @@ public:
|
|
184
184
|
virtual void free() {
|
185
185
|
persistent_value.Reset();
|
186
186
|
AllocatedResource::free();
|
187
|
+
h8 = 0;
|
188
|
+
}
|
189
|
+
|
190
|
+
virtual void rb_mark_gc() {
|
191
|
+
rb_gc_mark(h8->ruby_context());
|
187
192
|
}
|
188
193
|
|
189
194
|
virtual Local<Value> value() const {
|
@@ -195,7 +200,13 @@ public:
|
|
195
200
|
}
|
196
201
|
|
197
202
|
virtual ~JsGate() {
|
198
|
-
|
203
|
+
if( h8 ) {
|
204
|
+
Locker l(h8->getIsolate());
|
205
|
+
persistent_value.Reset();
|
206
|
+
}
|
207
|
+
else {
|
208
|
+
persistent_value.Reset();
|
209
|
+
}
|
199
210
|
}
|
200
211
|
|
201
212
|
private:
|
data/ext/h8/main.cpp
CHANGED
data/lib/h8/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: h8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sergeych
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|