pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
898 stars 120 forks source link

Use 'FromMaybe' variant of GetFunction()->NewInstance() #50

Closed tim-janik closed 6 years ago

tim-janik commented 7 years ago

to avoid deprecation warning

Signed-off-by: Tim Janik timj@gnu.org

pmed commented 7 years ago

Well, this moving to Maybe and MaybeLocal usage in V8 API is about 2 years, and as I understand is still not completed. There are many other places in v8pp where Maybe can be used instead of old partially deprecated functions.

So at the present I prefer not to break compatibility with older V8 versions, at least from version 4.10. I use preprocessor definitions V8_USE_UNSAFE_HANDLES and V8_DISABLE_DEPRECATIONS to continue the deprecated functions usage in my projects with v8pp.

But in general, you are right, and some time this should be done.

pmed commented 6 years ago

Done.