pmed / v8pp

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

no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *' #117

Closed jacobsologub closed 4 years ago

jacobsologub commented 4 years ago

Getting the following error when including the library. c++17 branch

#include <v8pp/module.hpp>
#include <v8pp/class.hpp>
In file included from ../../vendor/v8pp/v8pp/module.hpp:14:
In file included from ../../vendor/v8pp/v8pp/function.hpp:16:
In file included from ../../vendor/v8pp/v8pp/call_from_v8.hpp:17:
../../vendor/v8pp/v8pp/convert.hpp:145:30: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
                return value->BooleanValue(isolate->GetCurrentContext()).FromJust();
jacobsologub commented 4 years ago

updating...

return value->BooleanValue(isolate).FromJust();

now getting this:

In file included from ../../vendor/v8pp/v8pp/module.hpp:14:
In file included from ../../vendor/v8pp/v8pp/function.hpp:16:
In file included from ../../vendor/v8pp/v8pp/call_from_v8.hpp:17:
../../vendor/v8pp/v8pp/convert.hpp:145:38: error: member reference base type 'bool' is not a structure or union
                return value->BooleanValue(isolate).FromJust();
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
jacobsologub commented 4 years ago

macOS, Xcode 10.2.1 (10E1001)

pmed commented 4 years ago

Hi,

I've got the same build error with the new V8 version 7.6. It seems that v8::Value::BooleanValue() function argument and return types have been changed in the new version.

Which V8 version do you use?

ср, 21 авг. 2019 г., 9:20 Jacob Sologub notifications@github.com:

updating...

return value->BooleanValue(isolate).FromJust();

now getting this:

In file included from ../../vendor/v8pp/v8pp/module.hpp:14: In file included from ../../vendor/v8pp/v8pp/function.hpp:16: In file included from ../../vendor/v8pp/v8pp/call_from_v8.hpp:17: ../../vendor/v8pp/v8pp/convert.hpp:145:38: error: member reference base type 'bool' is not a structure or union return value->BooleanValue(isolate).FromJust();



—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/pmed/v8pp/issues/117?email_source=notifications&email_token=AAISAUVKMEQSJ2Y4XJJWOCLQFTNDTA5CNFSM4IOCCOXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4YSKBQ#issuecomment-523314438>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAISAUTCIUMPTR6CUCPIHADQFTNDTANCNFSM4IOCCOXA>
.
jacobsologub commented 4 years ago

@pmed I'm using the latest 7.8.151

local fix:

return value->BooleanValue(isolate);