We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43ffda2 commit cbe162fCopy full SHA for cbe162f
shellcore/types_jscript.cc
@@ -133,7 +133,7 @@ bool JScript_function::operator != (const Function_base &UNUSED(other)) const {
133
134
Value JScript_function::invoke(const Argument_list &args) {
135
const unsigned argc = args.size();
136
- v8::Local<v8::Value> argv[argc];
+ v8::Local<v8::Value> *argv = new v8::Local<v8::Value>[argc];
137
138
for(size_t index = 0; index < args.size(); index++)
139
argv[index] = _js->shcore_value_to_v8_value(args[index]);
@@ -142,5 +142,7 @@ Value JScript_function::invoke(const Argument_list &args) {
142
143
v8::Local<v8::Value> ret_val = callback->Call(_js->isolate()->GetCurrentContext()->Global(), argc, argv);
144
145
+ delete[] argv;
146
+
147
return _js->v8_value_to_shcore_value(ret_val);
148
}
0 commit comments