mini_racer 0.4.0 → 0.6.2

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: e73ac3193df3f33b51463ba1125ac4eee312caecd47833c545e098ba91d11ece
4
- data.tar.gz: d6d754829b36953d239ba85e84d2fc88c0af3ccbadd3f8d2e4cd9759bd24fab2
3
+ metadata.gz: e832863760637f983976194ebef263d8815c149d48ff26c7200367ab33640dda
4
+ data.tar.gz: 7c1c393ae6403a75d2a413395d56e7d5f3affe706b81c121273b4c6b5d471bf4
5
5
  SHA512:
6
- metadata.gz: 52a0799d84be10bb03774789b3d12d4f0fe2d4159d310b9c6a1ae3dcf878a99cd6b7c786fae813f29754a894ecf5fcc6b7e07834c0aba994a16da5c54d75595b
7
- data.tar.gz: bc478bdb582d7b786d28754200063d7ef185396e0da23840f006679bc1af6707f54c7a719918360afa9b24c2b4ab083ca081e2b2d6853095ecd5949a9482ecbd
6
+ metadata.gz: 4504cb3a564e5b311b65de74bac321b058995af17df47f9f3dc01fcb589a87eebfda55497e0ddb135a2ab15ef1818760652561d434d3f497c0dbd036451934c6
7
+ data.tar.gz: b83df123a61092ab4041212bb6e4f15b276d5e32e8be8d2b5cbc014988b8cf20ed0e0b3b30595de53ca4c0d599a86112d695009cda13891fe177742aff7d911e
@@ -29,8 +29,6 @@ jobs:
29
29
  fail-fast: false
30
30
  matrix:
31
31
  ruby:
32
- - '2.4'
33
- - '2.5'
34
32
  - '2.6'
35
33
  - '2.7'
36
34
  - '3.0'
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ Gemfile.lock
10
10
  lib/mini_racer_extension.so
11
11
  lib/mini_racer_loader.so
12
12
  *.bundle
13
+ .vscode/
data/.travis.yml CHANGED
@@ -1,8 +1,6 @@
1
1
  language: ruby
2
2
  os: linux
3
3
  rvm:
4
- - 2.4
5
- - 2.5
6
4
  - 2.6
7
5
  - 2.7
8
6
  - 3.0
@@ -12,9 +10,6 @@ arch:
12
10
  - arm64
13
11
  jobs:
14
12
  include:
15
- - rvm: 2.5
16
- os: osx
17
- osx_image: xcode9.4
18
13
  - rvm: 2.6
19
14
  os: osx
20
15
  osx_image: xcode11.3
@@ -25,7 +20,4 @@ jobs:
25
20
  os: osx
26
21
  osx_image: xcode12.2
27
22
  dist: xenial
28
- before_install:
29
- - gem update --system
30
- - gem install bundler -v 1.16.2
31
23
  cache: bundler
data/CHANGELOG CHANGED
@@ -1,5 +1,35 @@
1
+ - 17-01-2021
2
+
3
+ - 0.6.2
4
+
5
+ - Fix support for compilation on 2.6, llvm compiles
6
+ - Stability patches to handle rare memory leaks
7
+ - Corrected re-raising of exceptions to support strings
8
+ - During early termination of context under certain conditions MiniRacer could crash
9
+
10
+
11
+ - 31-12-2021
12
+
13
+ - 0.6.1
14
+
15
+ - Added support for single threaded platform: `MiniRacer::Platform.set_flags! :single_threaded`
16
+ must be called prior to booting ANY MiniRacer::Context
17
+
18
+ - 0.6.0
19
+
20
+ - Ruby 3.1 support
21
+ - Fixes memory leak in heap snapshotting
22
+ - Improved compilation ergonomics in clang
23
+ - Migrated internal storage in c extension to TypedData
24
+
1
25
  - 11-04-2021
2
26
 
27
+ - 0.5.0
28
+ - Fixes issues on aarch (Apple M1)
29
+ - Update to use libv8-node 16.x (#210) [Loic Nageleisen]
30
+ - FEATURE: Configurable max marshal stack depth (#202) [seanmakesgames]
31
+ - Ruby 2.3 and 2.4 are EOL, we no longer support them
32
+
3
33
  - 0.4.0
4
34
 
5
35
  - FEATURE: upgrade to libv8 node 15.14.0 (v8 8.6.395.17)
data/README.md CHANGED
@@ -85,6 +85,19 @@ context.eval 'var a = new Array(10000); while(true) {a = a.concat(new Array(1000
85
85
  # => V8OutOfMemoryError is raised
86
86
  ```
87
87
 
88
+ ### Object marshal max stackdepth support
89
+
90
+ Contexts can specify a stack depth limit for object marshalling. Max depth is unbounded by default.
91
+
92
+ ```ruby
93
+ # terminates script if stack depth exceeds max during marshal
94
+ context = MiniRacer::Context.new(marshal_stack_depth: 500)
95
+ context.attach("a", proc{|a| a})
96
+
97
+ context.eval("let arr = []; arr.push(arr); a(arr)")
98
+ # => RuntimeError is raised
99
+ ```
100
+
88
101
  ### Rich debugging with "filename" support
89
102
 
90
103
  ```ruby
@@ -403,14 +416,14 @@ Or install it yourself as:
403
416
  $ gem install mini_racer
404
417
 
405
418
 
406
- **Note** using v8.h and compiling MiniRacer requires a C++11 standard compiler, more specifically clang 3.5 (or later) or gcc 4.8 (or later).
419
+ **Note** using v8.h and compiling MiniRacer requires a C++11 standard compiler, more specifically clang 3.5 (or later) or GCC 6.3 (or later).
407
420
 
408
421
 
409
422
  ## Travis-ci
410
423
 
411
- To install `mini-racer` you will need a version of gcc that supports C++11 (gcc 4.8) this is included by default in ubuntu trusty based images.
424
+ To install `mini-racer` you will need a version of GCC that supports C++11 (GCC 6.3) this is included by default in ubuntu trusty based images.
412
425
 
413
- Travis today ships by default with a precise based image. Precise Pangolin (12.04 LTS) was first released in August 2012. Even though you can install GCC 4.8 on precise the simpler approach is to opt for the trusty based image.
426
+ Travis today ships by default with a precise based image. Precise Pangolin (12.04 LTS) was first released in August 2012. Even though you can install GCC 6.3 on precise the simpler approach is to opt for the trusty based image.
414
427
 
415
428
  Add this to your .travis.yml file:
416
429
 
data/Rakefile CHANGED
@@ -92,5 +92,5 @@ task :lint do
92
92
  portability-*
93
93
  readability-*).join(',')
94
94
 
95
- sh RbConfig::expand("clang-tidy -checks='#{checks}' ext/mini_racer_extension/mini_racer_extension.cc -- #$INCFLAGS #$CPPFLAGS", conf)
95
+ sh RbConfig::expand("clang-tidy -checks='#{checks}' ext/mini_racer_extension/mini_racer_extension.cc -- #$INCFLAGS #$CXXFLAGS", conf)
96
96
  end
@@ -7,18 +7,25 @@ IS_DARWIN = RUBY_PLATFORM =~ /darwin/
7
7
 
8
8
  have_library('pthread')
9
9
  have_library('objc') if IS_DARWIN
10
- $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
11
- $CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g"
12
- $CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic"
13
- $CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or IS_DARWIN
14
- $CPPFLAGS += " -std=c++0x"
15
- $CPPFLAGS += " -fpermissive"
16
- $CPPFLAGS += " -DV8_COMPRESS_POINTERS"
17
- $CPPFLAGS += " -fvisibility=hidden "
18
-
19
- $CPPFLAGS += " -Wno-reserved-user-defined-literal" if IS_DARWIN
20
-
21
- $LDFLAGS.insert(0, " -stdlib=libc++ ") if IS_DARWIN
10
+ $CXXFLAGS += " -Wall" unless $CXXFLAGS.split.include? "-Wall"
11
+ $CXXFLAGS += " -g" unless $CXXFLAGS.split.include? "-g"
12
+ $CXXFLAGS += " -rdynamic" unless $CXXFLAGS.split.include? "-rdynamic"
13
+ $CXXFLAGS += " -fPIC" unless $CXXFLAGS.split.include? "-rdynamic" or IS_DARWIN
14
+ $CXXFLAGS += " -std=c++14"
15
+ $CXXFLAGS += " -fpermissive"
16
+ #$CXXFLAGS += " -DV8_COMPRESS_POINTERS"
17
+ $CXXFLAGS += " -fvisibility=hidden "
18
+
19
+ # __declspec gets used by clang via ruby 3.x headers...
20
+ $CXXFLAGS += " -fms-extensions"
21
+
22
+ $CXXFLAGS += " -Wno-reserved-user-defined-literal" if IS_DARWIN
23
+
24
+ if IS_DARWIN
25
+ $LDFLAGS.insert(0, " -stdlib=libc++ ")
26
+ else
27
+ $LDFLAGS.insert(0, " -lstdc++ ")
28
+ end
22
29
 
23
30
  # check for missing symbols at link time
24
31
  # $LDFLAGS += " -Wl,--no-undefined " unless IS_DARWIN
@@ -64,8 +71,13 @@ end
64
71
  Libv8::Node.configure_makefile
65
72
 
66
73
  if enable_config('asan')
67
- $CPPFLAGS.insert(0, " -fsanitize=address ")
74
+ $CXXFLAGS.insert(0, " -fsanitize=address ")
68
75
  $LDFLAGS.insert(0, " -fsanitize=address ")
69
76
  end
70
77
 
78
+ # there doesn't seem to be a CPP macro for this in Ruby 2.6:
79
+ if RUBY_ENGINE == 'ruby'
80
+ $CPPFLAGS += ' -DENGINE_IS_CRUBY '
81
+ end
82
+
71
83
  create_makefile 'mini_racer_extension'