mini_racer 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26a28b25121d8a935ef202c191063315cc0aa6f2
4
- data.tar.gz: be7d2dbfed7abdf88f798fcb8d4faaa5a77bc9b5
3
+ metadata.gz: d63ec5ac7ad997e6695711b8964f26b42b0ee5e1
4
+ data.tar.gz: a6480ca1f69c367c84c33826ea064a79740a4814
5
5
  SHA512:
6
- metadata.gz: ba51d49df0b522f47df971fd6e28c54fb510ab98cf863a4138dc3be79a4400a5b1b5884d6a025518cbc6359573b51c929c99c8062dd1f4dc7a399d56f4da8742
7
- data.tar.gz: 76156c3ee051d4556577d31fc590806825e9c055aedd65468be2e285b204ae24af4fb02b7d507bfa3e62aed2f3380ad05a44a72efafec3e92b24a13135f65ced
6
+ metadata.gz: 64536e097f66fb5e080640072803222cd245ab819f46861f7d647743cfaf4aa87398d2d75db2e828420809c4f2c89ab96764ab39433dff0dee781ed6975a8be6
7
+ data.tar.gz: f2e964d1bcc672fbc089c315b5a4775c39130abe646cc56ae6e89a309224c7638f8547cd0387b940df0bbde4e48bd07d2982b3c6b38a85347c9ce4c10f9bf6fb
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 02-11-2016
2
+
3
+ - 0.1.7
4
+
5
+ - Fix: if for some reason an isolate was forked don't free it and raise a warning instead to avoid hanging process
6
+
1
7
  25-10-2016
2
8
 
3
9
  - 0.1.6
@@ -30,6 +30,7 @@ typedef struct {
30
30
  ArrayBufferAllocator* allocator;
31
31
  StartupData* startup_data;
32
32
  bool interrupted;
33
+ pid_t pid;
33
34
 
34
35
  // how many references to this isolate exist
35
36
  // we can't rely on Ruby's GC for this, because when destroying
@@ -763,10 +764,14 @@ void maybe_free_isolate_info(IsolateInfo* isolate_info) {
763
764
 
764
765
  if (isolate_info->isolate) {
765
766
  if (isolate_info->interrupted) {
766
- fprintf(stderr, "WARNING: V8 isolate was interrupted by Ruby, it can not be disposed and memory will not be reclaimed till the Ruby process exits.");
767
+ fprintf(stderr, "WARNING: V8 isolate was interrupted by Ruby, it can not be disposed and memory will not be reclaimed till the Ruby process exits.\n");
767
768
  } else {
768
769
 
769
- isolate_info->isolate->Dispose();
770
+ if (isolate_info->pid != getpid()) {
771
+ fprintf(stderr, "WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.\n");
772
+ } else {
773
+ isolate_info->isolate->Dispose();
774
+ }
770
775
  }
771
776
  isolate_info->isolate = NULL;
772
777
  }
@@ -846,6 +851,7 @@ VALUE allocate_isolate(VALUE klass) {
846
851
  isolate_info->startup_data = NULL;
847
852
  isolate_info->interrupted = false;
848
853
  isolate_info->refs_count = 0;
854
+ isolate_info->pid = getpid();
849
855
 
850
856
  return Data_Wrap_Struct(klass, NULL, deallocate_isolate, (void*)isolate_info);
851
857
  }
@@ -1,3 +1,3 @@
1
1
  module MiniRacer
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_racer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-25 00:00:00.000000000 Z
11
+ date: 2016-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler