mini_racer 0.2.14 → 0.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d31e1517a2d52257af3ecd56079e6fcaed4a569ff2256fba4db7c92f922b6cbd
4
- data.tar.gz: 777208a006502e94f375e54f43541273b49ecdc7657ac004bec88515b1e620b7
3
+ metadata.gz: 359264fa5fcef999d505e7a76075d98d08310e88c4bdc983c9e3ce87122a990c
4
+ data.tar.gz: 46444c7126d86d41a78a8c44c97f31433eff7e4c7551ba46a7b19e7f2b64100c
5
5
  SHA512:
6
- metadata.gz: c08eecc3edcc923625a8cd6cd87b4c88a4c4f80d64c9c4edee1f68897b595f5cf02927d1d3268f8bdb1d9e81b170c75dfe3875cc1c436fdeed11ebc40759b64c
7
- data.tar.gz: 3d82acdd3ec745bc2467e5429c849f1719bf3c711a454b588db9871b36770df64aa37947103eedc553846a04e0e754752d214c208f9f65a6eae1e35686f3068e
6
+ metadata.gz: 6c682ae187454565667c71132a39eed4b179b642d34cf9e48d9a9333973394dbf368000758b89dc721ee3e264708e44cc6812f5530afc3c0aad976697a7fe9a7
7
+ data.tar.gz: cc032e45e917c57ac329813344dd241dc12ba95b02b5088d0d945a0bf15ea0db8feb9bb147caf1efc8795d1abfec6e321cc16798ea1c554789d26ee9d44cd389
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ - 29-06-2020
2
+
3
+ - 0.2.15
4
+
5
+ - FEATURE: basic wasm support via pump_message_loop
6
+
1
7
  - 15-05-2020
2
8
 
3
9
  - 0.2.14
data/README.md CHANGED
@@ -315,6 +315,16 @@ context.eval("a = 2")
315
315
  # nothing works on the context from now on, its a shell waiting to be disposed
316
316
  ```
317
317
 
318
+ A MiniRacer context can also be dumped in a heapsnapshot file using `#write_heap_snapshot(file_or_io)`
319
+
320
+ ```ruby
321
+ context = MiniRacer::Context.new(timeout: 5)
322
+ context.eval("let a='testing';")
323
+ context.write_heap_snapshot("test.heapsnapshot")
324
+ ```
325
+
326
+ This file can then be loaded in the memory tab of the chrome dev console.
327
+
318
328
  ### Function call
319
329
 
320
330
  This calls the function passed as first argument:
@@ -779,6 +779,19 @@ static VALUE rb_isolate_low_memory_notification(VALUE self) {
779
779
  return Qnil;
780
780
  }
781
781
 
782
+ static VALUE rb_isolate_pump_message_loop(VALUE self) {
783
+ IsolateInfo* isolate_info;
784
+ Data_Get_Struct(self, IsolateInfo, isolate_info);
785
+
786
+ if (current_platform == NULL) return Qfalse;
787
+
788
+ if (platform::PumpMessageLoop(current_platform.get(), isolate_info->isolate)){
789
+ return Qtrue;
790
+ } else {
791
+ return Qfalse;
792
+ }
793
+ }
794
+
782
795
  static VALUE rb_context_init_unsafe(VALUE self, VALUE isolate, VALUE snap) {
783
796
  ContextInfo* context_info;
784
797
  Data_Get_Struct(self, ContextInfo, context_info);
@@ -1668,7 +1681,7 @@ extern "C" {
1668
1681
 
1669
1682
  rb_define_method(rb_cIsolate, "idle_notification", (VALUE(*)(...))&rb_isolate_idle_notification, 1);
1670
1683
  rb_define_method(rb_cIsolate, "low_memory_notification", (VALUE(*)(...))&rb_isolate_low_memory_notification, 0);
1671
-
1684
+ rb_define_method(rb_cIsolate, "pump_message_loop", (VALUE(*)(...))&rb_isolate_pump_message_loop, 0);
1672
1685
  rb_define_private_method(rb_cIsolate, "init_with_snapshot",(VALUE(*)(...))&rb_isolate_init_with_snapshot, 1);
1673
1686
 
1674
1687
  rb_define_singleton_method(rb_cPlatform, "set_flag_as_str!", (VALUE(*)(...))&rb_platform_set_flag_as_str, 1);
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MiniRacer
4
- VERSION = "0.2.14"
4
+ VERSION = "0.2.15"
5
5
  end
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "rake", ">= 12.3.3"
31
31
  spec.add_development_dependency "minitest", "~> 5.0"
32
32
  spec.add_development_dependency "rake-compiler"
33
+ spec.add_development_dependency "m"
33
34
 
34
35
  spec.add_dependency 'libv8', '> 7.3'
35
36
  spec.require_paths = ["lib", "ext"]
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.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: m
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: libv8
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -108,10 +122,10 @@ licenses:
108
122
  - MIT
109
123
  metadata:
110
124
  bug_tracker_uri: https://github.com/discourse/mini_racer/issues
111
- changelog_uri: https://github.com/discourse/mini_racer/blob/v0.2.14/CHANGELOG
112
- documentation_uri: https://www.rubydoc.info/gems/mini_racer/0.2.14
113
- source_code_uri: https://github.com/discourse/mini_racer/tree/v0.2.14
114
- post_install_message:
125
+ changelog_uri: https://github.com/discourse/mini_racer/blob/v0.2.15/CHANGELOG
126
+ documentation_uri: https://www.rubydoc.info/gems/mini_racer/0.2.15
127
+ source_code_uri: https://github.com/discourse/mini_racer/tree/v0.2.15
128
+ post_install_message:
115
129
  rdoc_options: []
116
130
  require_paths:
117
131
  - lib
@@ -128,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
142
  version: '0'
129
143
  requirements: []
130
144
  rubygems_version: 3.0.3
131
- signing_key:
145
+ signing_key:
132
146
  specification_version: 4
133
147
  summary: Minimal embedded v8 for Ruby
134
148
  test_files: []