1
0
Fork 0
mirror of https://github.com/rubyjs/mini_racer synced 2023-03-27 23:21:28 -04:00
Commit graph

23 commits

Author SHA1 Message Date
Petko Bordjukov
a22348f73e Introduce compatibility with V8 7.3 (#138)
* Mechanical removal of use of non-maybe String::ToObject()

Due to the non-maybe version of String::ToObject() being deprecated and
altogether removed from V8 [1] it is necessary to migrate to using the maybe
version.

This commit is a mechanical change that uses the context at hand when calling
String::ToObject() to pass it to it.

The resulting MaybeLocal is then unwrapped with MaybeLocal::ToLocalChecked() as
I consider the verifications performed on the String instances to be sufficient
to ensure no crashes.

[1] https://chromium-review.googlesource.com/c/v8/v8/+/1172350/
    c8376b0069

* Mechanical removal of use of non-maybe Local<T>::ToString()

Due to the non-maybe version of Local<T>::ToString() being deprecated and
altogether removed from V8 [1] it is necessary to migrate to using the maybe
version.

This commit is a mechanical change that uses the context at hand when calling
Local<T>::ToString() to pass it to it.

The resulting MaybeLocal is then unwrapped with MaybeLocal::ToLocalChecked() as
I consider the context of the uses to be sufficiently safe.

[1] https://chromium-review.googlesource.com/c/v8/v8/+/1172350/
    c8376b0069

* Mechanical removal of the use of non-maybe Value::Int32Value() and NumberValue()

Due to the non-maybe version of Value::Int32Value() and Value::NumberValue()
being deprecated and altogether removed from V8 [1] it is necessary to migrate
to using the maybe versions.

This commit is a mechanical change that uses the context at hand when calling
Value::Int32Value() or Value::NumberValue() to pass it to the respective
function.

The resulting Maybe is then unwrapped with Maybe::ToChecked() as I consider the
verifications performed on the Value instances to be sufficient to ensure no
crashes.

[1] https://chromium-review.googlesource.com/c/v8/v8/+/1172350/
    c8376b0069

* Mechanical removal of use of String::Utf8Length() without isolate

Due to the version of String::Utf8Length() with no paramters being deprecated
and altogether removed from V8 [1] it is necessary to migrate to using the
version that accepts isolate as a parameter.

This commit is a mechanical change that uses the isolate available in the
context where String::Utf8Length() is called.

This is a breaking change imposing use of V8 6.9.411 or up.

[1] https://chromium-review.googlesource.com/c/v8/v8/+/1124724/
    3dd5c6fe38

* Remove the uses of deprecated snapshot-related functions

Due to V8::CreateSnapshotDataBlob() and V8::WarmUpSnapshotDataBlob() being
deprecated and altogether removed from V8 [1] it is necessary to migrate to
using local implementations of them.

This commit introduces create_snapshot_data_blob(), warm_up_snapshot_data_blob()
and the helper function run_extra_code(). Their implementations have been copied
over from [2].

[1] b3738e6583
    https://chromium-review.googlesource.com/c/v8/v8/+/1019442/

[2] https://github.com/v8/v8/blob/7.3.492.27/test/cctest/test-serialize.cc
    30602560a8/test/cctest/test-serialize.cc

* Non-trivial removal of uses of non-maybe Date::New()

Due to the non-maybe version of Date::New() being deprecated and altogether
removed from V8 [1] it is necessary to migrate to using the maybe version.

This commit introduces a context argument to the convert_ruby_to_v8() function
so it can be passed to the maybe version of Date::New().

This imposed changes throughout the code base so that the context can be passed
together with the isolate to convert_ruby_to_v8().

[1] https://chromium-review.googlesource.com/c/v8/v8/+/1357056
    e84b92d765

* Non-trivial removal of use of non-maybe Local<T>::ToString()

This commit builds upon fe62f7935582bd889742ec77ee2289a8f6cb16e6. The use of
Local<T>::ToString() in convert_result_to_ruby() did not have an immediately
available context to use. This commit unwraps the context from p_ctx and passes
it to the function and then unwraps the MaybeLocal result with
MaybeLocal::ToLocalChecked() assuming the verification beforehand is sufficient
to ensure there won't be any crashes.

* Update the changelog

* Replace placeholder in LICENSE.txt
2019-04-25 09:39:55 +10:00
Ian Ker-Seymer
723958f4da Add example of using source-map-support (#130)
* Add example of using source-map-support

* Address PR comments
2019-03-12 16:03:08 +11:00
Sam
04e5f81805 version bump 2018-07-06 10:49:23 +10:00
Sam
c1bcfcf536 FEATURE: we explicitly only support Ruby 2.3 and up
- remove 2.2 from travis
- be explicit in gemspec
- add note to readme
2018-06-27 09:35:22 +10:00
Petko Bordjukov
cbbe9c5fe4 Bump libv8 dependency 2018-06-23 01:40:04 +03:00
Sam
15e73429f6 Bump version closes #65 2017-12-28 08:52:56 +11:00
Sam Saffron
797df93162 correct dependency and do a version bump 2017-08-23 21:44:43 -04:00
Sam
0b1812b218 version bump 2017-08-23 12:17:33 -04:00
Sam
fcb1646308 bump version 2017-07-26 10:53:26 -04:00
Sam
1481e928bf FEATURE: upgrade libv8 to 5.7 2017-07-18 10:54:23 -04:00
Sam
80a178ac56 Bump version
- depend on latest v8
- comment out test that is rather slow
- add changelog
2016-10-10 08:43:18 +11:00
Petko Bordjukov
c9f141b58e Adjust header inclusions for changes in V8 5.1.11
Since [1] V8 finally assumes that v8/include is in the include path.

[1] e8c914f18f
2016-06-15 11:58:22 +03:00
Petko Bordjukov
2429cb8a84 Set an upper limit on the version of libv8
V8 5.1.11 introduces a breaking change, so let's make sure we don't use
it when a newer libv8 is released.
2016-06-14 12:06:37 +03:00
Andrew Nesbitt
8ccc04736c Added homepage github link to the gemspec 2016-05-19 09:18:42 +01:00
Sam Saffron
4d1ff7cc4c Minimal version is Ruby 2.0 2016-05-17 10:47:38 +10:00
Sam
2818cce858 refactor benchmarks 2016-05-16 16:47:57 +10:00
Sam
5bc96f9433 depend on libv8 stable 2016-05-16 15:59:49 +10:00
Sam
bef187e0e3 be specific cause gem is in beta 2016-05-14 11:30:29 +10:00
Sam
575f65e95f try to fix travis 2016-05-14 11:26:03 +10:00
Sam
b2aeb72ba4 stop depending on such a recent version of bundle 2016-05-14 11:22:25 +10:00
Petko Bordjukov
b6e6cb2751 Enable usage of the libv8 gem 2016-05-13 23:02:11 +03:00
Sam Saffron
4deaa0d47e make this thing work on a mac 2016-05-08 23:43:49 +10:00
Sam
1dd2a44a6f initial commit 2016-05-04 16:54:51 +10:00