From a799bcf05458669595b4e426f37b28566a79fda2 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 2 Aug 2024 10:48:01 +0200 Subject: [PATCH] Build with I/O fixes --- build/jsroot.js | 15 ++++++++++----- changes.md | 4 ++++ modules/core.mjs | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build/jsroot.js b/build/jsroot.js index 8bca31002..8ddffed0a 100644 --- a/build/jsroot.js +++ b/build/jsroot.js @@ -1,4 +1,4 @@ -// https://root.cern/js/ v7.7.2 +// https://root.cern/js/ v7.7.x (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : @@ -7,11 +7,11 @@ typeof define === 'function' && define.amd ? define(['exports'], factory) : /** @summary version id * @desc For the JSROOT release the string in format 'major.minor.patch' like '7.0.0' */ -const version_id = '7.7.2', +const version_id = '7.7.x', /** @summary version date * @desc Release date in format day/month/year like '14/04/2022' */ -version_date = '19/06/2024', +version_date = '2/08/2024', /** @summary version id and date * @desc Produced by concatenation of {@link version_id} and {@link version_date} @@ -76754,7 +76754,7 @@ let TH2Painter$2 = class TH2Painter extends THistPainter { if (draw_colors && (colindx !== null)) item.style('fill', this._color_palette.getColor(colindx)); else if (draw_fill) - item.call('fill', this.createAttFill(gr).func); + item.call(this.createAttFill(gr).func); else item.style('fill', 'none'); if (draw_lines) @@ -99565,7 +99565,7 @@ class TFile { * @private */ async readKeys() { // with the first readbuffer we read bigger amount to create header cache - return this.readBuffer([0, 1024]).then(blob => { + return this.readBuffer([0, 400]).then(blob => { const buf = new TBuffer(blob, 0, this); if (buf.substring(0, 4) !== 'root') return Promise.reject(Error(`Not a ROOT file ${this.fURL}`)); @@ -99900,6 +99900,11 @@ function readMapElement(buf) { } const n = buf.ntoi4(), res = new Array(n); + + // no extra data written for empty map + if (n === 0) + return res; + if (this.member_wise && (buf.remain() >= 6)) { if (buf.ntoi2() === kStreamedMemberWise) buf.shift(4); // skip checksum diff --git a/changes.md b/changes.md index 4a1c6eb96..22a8280b1 100644 --- a/changes.md +++ b/changes.md @@ -1,5 +1,9 @@ # JSROOT changelog +## Changes in 7.7.x +1. Fix - correctly handle in I/O empty std::map +2. Fix - reading of small (<1KB) ROOT files + ## Changes in 7.7.2 1. Fix - hide empty title on the canvas diff --git a/modules/core.mjs b/modules/core.mjs index f4ca0b9b6..0e18cce64 100644 --- a/modules/core.mjs +++ b/modules/core.mjs @@ -4,7 +4,7 @@ const version_id = '7.7.x', /** @summary version date * @desc Release date in format day/month/year like '14/04/2022' */ -version_date = '19/06/2024', +version_date = '2/08/2024', /** @summary version id and date * @desc Produced by concatenation of {@link version_id} and {@link version_date}