File tree Expand file tree Collapse file tree 2 files changed +6
-16
lines changed Expand file tree Collapse file tree 2 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -775,14 +775,9 @@ inline void Environment::ThrowRangeError(const char* errmsg) {
775775 ThrowError (v8::Exception::RangeError, errmsg);
776776}
777777
778- inline void Environment::ThrowError (V8ExceptionConstructorOld fun,
779- const char * errmsg) {
780- v8::HandleScope handle_scope (isolate ());
781- isolate ()->ThrowException (fun (OneByteString (isolate (), errmsg)));
782- }
783-
784- inline void Environment::ThrowError (V8ExceptionConstructorNew fun,
785- const char * errmsg) {
778+ inline void Environment::ThrowError (
779+ v8::Local<v8::Value> (*fun)(v8::Local<v8::String>, v8::Local<v8::Value>),
780+ const char* errmsg) {
786781 v8::HandleScope handle_scope (isolate ());
787782 isolate ()->ThrowException (fun (OneByteString (isolate (), errmsg), {}));
788783}
Original file line number Diff line number Diff line change @@ -1029,14 +1029,9 @@ class Environment : public MemoryRetainer {
10291029 };
10301030
10311031 private:
1032- // V8 has changed the constructor of exceptions, support both APIs before Node
1033- // updates to V8 12.1.
1034- using V8ExceptionConstructorOld =
1035- v8::Local<v8::Value> (*)(v8::Local<v8::String>);
1036- using V8ExceptionConstructorNew =
1037- v8::Local<v8::Value> (*)(v8::Local<v8::String>, v8::Local<v8::Value>);
1038- inline void ThrowError (V8ExceptionConstructorOld fun, const char * errmsg);
1039- inline void ThrowError (V8ExceptionConstructorNew fun, const char * errmsg);
1032+ inline void ThrowError (v8::Local<v8::Value> (*fun)(v8::Local<v8::String>,
1033+ v8::Local<v8::Value>),
1034+ const char* errmsg);
10401035 void TrackContext (v8::Local<v8::Context> context);
10411036 void UntrackContext (v8::Local<v8::Context> context);
10421037
You can’t perform that action at this time.
0 commit comments