Skip to content

Commit e1d6902

Browse files
committed
[V8] Fix TryCatch
1 parent e8da0f6 commit e1d6902

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sources/CV8/wrappers.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,15 @@ extern "C" {
129129
Context::Scope context_scope(context);
130130
Local<String> source = String::NewFromUtf8(isolate, scriptPtr);
131131
Local<Script> script = Script::Compile(source);
132-
MaybeLocal<Value> result = script->Run(context);
132+
Local<Value> result = script->Run();
133133

134134
if (result.IsEmpty()) {
135135
if (exception != nullptr) {
136136
*exception = new Global<Value>(isolate, trycatch.Exception());
137137
}
138138
return nullptr;
139139
}
140-
auto local = result.ToLocalChecked();
141-
return new Global<Value>(isolate, local);
140+
return new Global<Value>(isolate, result);
142141
}
143142

144143
void disposeValue(void* pointer) {

0 commit comments

Comments
 (0)