Skip to content

Commit 33559f9

Browse files
committed
Fix several problems, discovered with "use strict" directive
1 parent fb39728 commit 33559f9

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

scripts/JSRootCore.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,6 @@
744744
var filecontent = "", u8Arr = new Uint8Array(xhr.response);
745745
for (var i = 0; i < u8Arr.length; ++i)
746746
filecontent += String.fromCharCode(u8Arr[i]);
747-
delete u8Arr;
748747

749748
return callback(filecontent);
750749
}

scripts/JSRootGeoBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@
27402740

27412741
var names = [], cnts = [], obj = null;
27422742
for (var k=0;k<chlds.length;++k) {
2743-
chld = chlds[k];
2743+
var chld = chlds[k];
27442744
if (!chld || !chld.fName) continue;
27452745
if (!chld.$geo_suffix) {
27462746
var indx = names.indexOf(chld.fName);

scripts/JSRootGeoPainter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@
27692769

27702770
if ((center[naxis]===0) && (center[naxis]>=box.min[name]) && (center[naxis]<=box.max[name]))
27712771
if (!this.options._axis_center || (naxis===0)) {
2772-
geom = new THREE.SphereBufferGeometry(text_size*0.25);
2772+
var geom = new THREE.SphereBufferGeometry(text_size*0.25);
27732773
mesh = new THREE.Mesh(geom, textMaterial);
27742774
mesh.translateX((naxis===0) ? center[0] : buf[0]);
27752775
mesh.translateY((naxis===1) ? center[1] : buf[1]);

scripts/JSRootIOEvolution.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -716,9 +716,6 @@
716716

717717
// ctor
718718
JSROOT.TDirectory = function(file, dirname, cycle) {
719-
if (! (this instanceof arguments.callee) )
720-
throw new Error("you must use new to instantiate this class", "JSROOT.TDirectory.ctor");
721-
722719
this.fFile = file;
723720
this._typename = "TDirectory";
724721
this.dir_name = dirname;
@@ -790,8 +787,6 @@
790787

791788
file.fDirectories.push(dir);
792789

793-
delete buf;
794-
795790
JSROOT.CallBack(readkeys_callback, dir);
796791
});
797792
}
@@ -823,9 +818,6 @@
823818

824819
// ctor
825820
JSROOT.TFile = function(url, newfile_callback) {
826-
if (! (this instanceof arguments.callee) )
827-
throw new Error("you must use new to instantiate this class", "JSROOT.TFile.ctor");
828-
829821
this._typename = "TFile";
830822
this.fEND = 0;
831823
this.fFullURL = url;
@@ -1384,7 +1376,7 @@
13841376
return JSROOT.CallBack(readkeys_callback, null);
13851377

13861378
// extra check to prevent reading of corrupted data
1387-
if (!file.fNbytesName || this.fNbytesName > 100000) {
1379+
if (!file.fNbytesName || file.fNbytesName > 100000) {
13881380
JSROOT.console("Init : cannot read directory info of file " + file.fURL);
13891381
return JSROOT.CallBack(readkeys_callback, null);
13901382
}
@@ -1438,13 +1430,8 @@
14381430

14391431
return JSROOT.CallBack(readkeys_callback, file);
14401432
});
1441-
1442-
delete buf5;
1443-
delete buf4;
14441433
});
1445-
delete buf3;
14461434
});
1447-
delete buf;
14481435
});
14491436
};
14501437

0 commit comments

Comments
 (0)