MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / queue

Function queue

packages/browser/test/loader.js:32–49  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

30 // Create a namespace and attach function that will store captured exception
31 // Because functions are also objects, we can attach the queue itself straight to it and save some bytes
32 var queue = function(content) {
33 // content.e = error
34 // content.p = promise rejection
35 // content.f = function call the Sentry
36 if (
37 ('e' in content ||
38 'p' in content ||
39 (content.f?.indexOf('capture') > -1) ||
40 (content.f?.indexOf('showReportDialog') > -1)) &&
41 lazy
42 ) {
43 // We only want to lazy inject/load the sdk bundle if
44 // an error or promise rejection occurred
45 // OR someone called `capture...` on the SDK
46 injectSdk(onLoadCallbacks);
47 }
48 queue.data.push(content);
49 };
50 queue.data = [];
51
52 function injectSdk(callbacks) {

Callers 1

loader.jsFile · 0.70

Calls 2

injectSdkFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected