MCPcopy
hub / github.com/plasma-umass/browsix / useRequest

Function useRequest

src/ld.js:8351–8362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8349 if (Module['memoryInitializerRequest']) {
8350 // a network request has already been created, just use that
8351 function useRequest() {
8352 var request = Module['memoryInitializerRequest'];
8353 if (request.status !== 200 && request.status !== 0) {
8354 // If you see this warning, the issue may be that you are using locateFile or memoryInitializerPrefixURL, and defining them in JS. That
8355 // means that the HTML file doesn't know about them, and when it tries to create the mem init request early, does it to the wrong place.
8356 // Look in your browser's devtools network console to see what's going on.
8357 console.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer);
8358 doBrowserLoad();
8359 return;
8360 }
8361 applyMemoryInitializer(request.response);
8362 }
8363 if (Module['memoryInitializerRequest'].response) {
8364 setTimeout(useRequest, 0); // it's already here; but, apply it asynchronously
8365 } else {

Callers

nothing calls this directly

Calls 2

doBrowserLoadFunction · 0.85
applyMemoryInitializerFunction · 0.85

Tested by

no test coverage detected