Save FreeCAD WebAssembly development state
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled

This commit is contained in:
2026-09-07 18:58:02 +08:00
parent 2778e3f9c2
commit f2eaf096d8
113 changed files with 30708 additions and 119 deletions

View File

@@ -26,11 +26,13 @@
#include <string.h>
#include <stdlib.h>
#ifndef WIN32
#include <unistd.h>
#include <sys/stat.h>
#include <execinfo.h>
#endif
#if !defined(WIN32)
#include <unistd.h>
#include <sys/stat.h>
#if !defined(__EMSCRIPTEN__)
#include <execinfo.h>
#endif
#endif
namespace Kernel_Utils
@@ -106,8 +108,8 @@ namespace Kernel_Utils
return guid;
}
#ifndef WIN32
void print_traceback()
#if !defined(WIN32) && !defined(__EMSCRIPTEN__)
void print_traceback()
{
void *array[50];
size_t size;
@@ -124,7 +126,9 @@ namespace Kernel_Utils
free (strings);
}
#else
#elif defined(__EMSCRIPTEN__)
void print_traceback() {}
#else
#if (_MSC_VER >= 1400) // Visual Studio 2005
#include <sstream>
int setenv(const char *name, const char *value, int rewrite)

View File

@@ -60,7 +60,7 @@ SMESH_Exception::SMESH_Exception( void ): /*exception() ,*/ _text(0)
const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber )
static const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber )
{
char *newText = 0 ;

View File

@@ -226,12 +226,19 @@ SMESH_Mesh::~SMESH_Mesh()
if ( _myMeshDS ) {
// delete _myMeshDS, in a thread in order not to block closing a study with large meshes
#ifdef __EMSCRIPTEN__
// Emscripten workers are not guaranteed to be available while a document is
// being torn down. Delete synchronously so WASM fixtures can release meshes
// deterministically without requiring a pthread just for cleanup.
delete _myMeshDS;
#else
#ifndef WIN32
boost::thread aThread(boost::bind( & deleteMeshDS, _myMeshDS ));
#else
boost::thread aThread(boost::bind( & deleteMeshDS, _myMeshDS ));
// pthread_t thread;
// int result=pthread_create(&thread, NULL, deleteMeshDS, (void*)_myMeshDS);
#endif
#endif
}
}