MCPcopy Create free account
hub / github.com/nodejs/node / processData

Function processData

deps/v8/test/mjsunit/wasm/embenchen/box2d.js:4026–4046  ·  view source on GitHub ↗
(byteArray)

Source from the content-addressed store, hash-verified

4024 // of parent and name being that we just join them anyways
4025 var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent;
4026 function processData(byteArray) {
4027 function finish(byteArray) {
4028 if (!dontCreateFile) {
4029 FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
4030 }
4031 if (onload) onload();
4032 removeRunDependency('cp ' + fullname);
4033 }
4034 var handled = false;
4035 Module['preloadPlugins'].forEach(function(plugin) {
4036 if (handled) return;
4037 if (plugin['canHandle'](fullname)) {
4038 plugin['handle'](byteArray, fullname, finish, function() {
4039 if (onerror) onerror();
4040 removeRunDependency('cp ' + fullname);
4041 });
4042 handled = true;
4043 }
4044 });
4045 if (!handled) finish(byteArray);
4046 }
4047 addRunDependency('cp ' + fullname);
4048 if (typeof url == 'string') {
4049 Browser.asyncLoad(url, function(byteArray) {

Callers 1

box2d.jsFile · 0.70

Calls 4

removeRunDependencyFunction · 0.70
finishFunction · 0.70
forEachMethod · 0.65
onerrorFunction · 0.50

Tested by

no test coverage detected