Recent

Author Topic: lazarus Call v8 to run js  (Read 348 times)

myisjwj

  • Jr. Member
  • **
  • Posts: 91
lazarus Call v8 to run js
« on: April 14, 2025, 05:04:17 pm »
Available in Delphi when executing js using V8. But in Lazarus
Code: Pascal  [Select][+][-]
  1. constructor Tv8Engine.Create;
  2. begin
  3. FIsolate := v8_new_isolate;
  4. v8_enter_isolate(FIsolate);
  5. FContext := v8_new_context(FIsolate); // This line has an error. external:flt divide by zero
  6. v8_leave_isolate(FIsolate);
  7. end;
Console display after forced running
# Fatal error in v8::Isolate::Dispose() Disposing the isolate that is entered by a thread.
Add SetExceptionMask([exInvalidOp..exPrecision]); Can be initialized. But return whatever js you run
SyntaxError: Invalid

 

TinyPortal © 2005-2018