You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.warn('The \'@sentry-internal/node-native-stacktrace\' binary could not be found. Use \'@electron/rebuild\' to ensure the native module is built for Electron.');
250
+
console.warn('The \'@sentry/node-native-stacktrace\' binary could not be found. Use \'@electron/rebuild\' to ensure the native module is built for Electron.');
284
251
throwe;
285
252
}
286
253
}
@@ -290,13 +257,15 @@ function getNativeModule(): Native {
290
257
returnnativeModule;
291
258
}
292
259
293
-
try{
294
-
recompileFromSource();
295
-
}catch(e){
296
-
console.warn('Failed to compile from source:',e);
297
-
}
260
+
withRebuildLock(()=>{
261
+
try{
262
+
recompileFromSource();
263
+
}catch(e){
264
+
console.warn('Failed to compile from source:',e);
265
+
}
266
+
});
298
267
299
-
// Try again after attempting to recompile, in case the binary is now available.
268
+
// Try again after recompile (or after another caller finished theirs).
300
269
nativeModule=tryLoad();
301
270
302
271
if(nativeModule){
@@ -308,7 +277,26 @@ function getNativeModule(): Native {
308
277
309
278
constnative=getNativeModule();
310
279
280
+
/**
281
+
* Registers the current thread with the native module.
282
+
*
283
+
* This should be called on every thread that you want to capture stack traces from.
284
+
*
285
+
* @param threadName The name of the thread
286
+
*
287
+
* threadName defaults to the `threadId` if not provided.
0 commit comments