profile
viewpoint
Timothy Gu TimothyGu @UCLA Los Angeles, California, USA https://timothygu.me/ Tim (he/him)

jsdom/jsdom 13657

A JavaScript implementation of various web standards, for use with Node.js

fgnass/spin.js 9297

A spinning activity indicator

node-fetch/node-fetch 4689

A light-weight module that brings window.fetch to Node.js

mde/ejs 4187

Embedded JavaScript templates -- http://ejs.co

stevekane/promise-it-wont-hurt 647

A Workshopper module that teaches you to use promises in javascript

pugjs/pug-loader 375

Pug loader module for Webpack

jsdom/webidl2js 35

Auto-generate JS class structures for Web IDL specifications

ForbesLindesay/seed-random 29

Generate random numbers with a seed, useful for reproducible tests

ForbesLindesay/acorn-globals 24

Use acorn to detect global variables in JavaScript

acm-hackschool-f17/Resources 19

Your guide to ACM Hackschool, Fall 2017

issue commentwhatwg/url

What should resolveRelativeUrl(base=..., relative="10.0.0.7:8080/foo.html") return?

See https://jsdom.github.io/whatwg-url/#url=MTAuMC4wLjc6ODA4MC9mb28uaHRtbA==&base=ZmlsZTovLy9zb21lL2Rpci9pcC1yZWxhdGl2ZS5odG1s. It appears that the Firefox behavior is correct per spec.

To see why this is, look instead at scheme start state. That state restricts all schemes to start with an ASCII letter, and only switches to scheme state after that is ascertained. See also the informative description of URL-scheme string.

anforowicz

comment created time in 9 hours

issue closedjsdom/jsdom

QuerySelector Not working with Node v12.16.1

Basic info:

  • Node.js version: v12.16.1
  • jsdom version: 16.2.0

Minimal reproduction case

const jsdom = require("jsdom");
const { JSDOM } = jsdom;

const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);
console.log(dom.window.document.querySelectorAll("p"));

When running this with Node version 12.16.1, the output of this is NodeList {}. When running with Node version <= 11, the output is NodeList { '0': HTMLParagraphElement {} }

closed time in 10 hours

dvreed77

issue commentjsdom/jsdom

QuerySelector Not working with Node v12.16.1

This is an artifact of recent changes to Node.js' util.format function, that is used in console.log. If you explicitly print out the length of the NodeList (or if you convert the NodeList to an array through Array.from or [...obj]), you see that the object is in fact not empty. See https://runkit.com/timothygu/5e588813857db1001441093f.

dvreed77

comment created time in 10 hours

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha b54f9157c3a1b6fd47f1da62a8f6fb94ced99646

Updates

view details

push time in 10 hours

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 9b22254331e9b83f7d0006b1559b39033d801959

avfilter/vf_v360: add initial barrel split format input support

view details

push time in 14 hours

push eventFFmpeg/FFmpeg

Michael Niedermayer

commit sha e5bb48ae5990347dff22fc38ff5a1c1f7f60a1c5

avformat/mpegts: Improve the position determination for avpriv_mpegts_parse_packet() Fixes: assertion failure Fixes: Ticket 8005 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha 35958782819c00211e247332ab18fbf2f28267e1

libavformat/avienc: Check bits per sample for PAL8 Fixes: assertion failure Fixes: Ticket 8172 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha e13eee37ee3268b0a985ddc74a9bde0179bd553c

avcodec/motion_est_template: Fix invalid shifts in no_sub_motion_search() Fixes: Ticket8167 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha a2c97a8342fab6393280cc2f0e2ffb39c381d29c

avcodec/mpegaudioenc_template: fix invalid shift of sample Fixes: Ticket8010 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

push time in 15 hours

push eventFFmpeg/FFmpeg

Carl Eugen Hoyos

commit sha 516e9b9d72be1698bc232db652dad19389a16db5

mailmap: Add another old mail address I used.

view details

push time in a day

push eventFFmpeg/FFmpeg

Thilo Borgmann

commit sha b870a6bffa914ec63a5c08a66bde69f604c5dfb1

mailmap: add entry for myself

view details

push time in a day

push eventFFmpeg/FFmpeg

rcombs

commit sha bdab3e810878f9520a9ec664f177e7e43fc6515b

mailmap: add entry for myself

view details

push time in a day

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha 55bfc0ef28f84c1c5b9558a571546fa9a006a9e0

Updates

view details

push time in a day

push eventFFmpeg/FFmpeg

Josh de Kock

commit sha a439acee3f27655be805d9129ba53ac46716d7c6

Add .mailmap This allows for easy shortlog/log parsing, useful in determining eligible members of the general assembly for the new FFmpeg voting system. Signed-off-by: Josh de Kock <josh@itanimul.li>

view details

push time in 2 days

push eventFFmpeg/FFmpeg

Marton Balint

commit sha 95324ecf235a467f6804019e250e59bca576922a

avdevice/decklink_dec: fix stopping streams in read_close The capture_started variable was never set, it is simpler to call the stop functions unconditionally if the interface is available. Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha f32f9231dd4f74d9f95eef575b838bdc3e06a234

avdevice/decklink: add support for SDK version 11.5 Fixes ticket #8534. Signed-off-by: Marton Balint <cus@passwd.hu>

view details

push time in 2 days

push eventautotools-mirror/automake

Karl Berry

commit sha 9ba2f0ddbcf08d4d67baffa8779abff7042a1c96

python: support both Python 2 and 3 in py-compile * lib/py-compile: check python major version and use imp or importlib accordingly, plus related changes. Original patch for Python 3 only from Gabriel Ganne at: https://lists.gnu.org/archive/html/automake-patches/2019-07/msg00002.html

view details

push time in 2 days

push eventFFmpeg/FFmpeg

James Almer

commit sha e9aa1bfd8cc0b0335119ada66824130bdd1d2bc1

avformat/dashenc: use a quieter log lever when informing prft was automatically enabled Suggested-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha 3e9793cf383054c0e8656996231d006d67bb3067

doc/muxers: describe the default behavior of the write_prft dash muxer option Signed-off-by: James Almer <jamrial@gmail.com>

view details

push time in 2 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha b0a9960a772a5f978fc9f52552932c6a2ab3405c

avfilter/vf_v360: add barrel split format output support

view details

push time in 2 days

push eventFFmpeg/FFmpeg

Ting Fu

commit sha 828f7db5d9fdf9052bb4b6d1b528009fece5bb10

libswscale/x86/yuv2rgb: Fix Segmentation Fault when load unaligned data Fixes ticket #8532 Signed-off-by: Ting Fu <ting.fu@intel.com>

view details

push time in 2 days

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha a392d8b1c7c573535bc88688d11d9077b7092a64

Updates

view details

push time in 2 days

push eventFFmpeg/FFmpeg

Jacob Ruiz

commit sha ba2581adb26f5df1c8b605ae80fc3005f4e53ee0

avfilter/vf_zscale: fix crash on unaligned input

view details

Andreas Rheinhardt

commit sha ab44f0aee88032d2a406b689ff2ff144cf26b0ef

avformat/segafilmenc: Combine several checks by moving them around. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Andreas Rheinhardt

commit sha da304e78b5175cb45b06116006e1901cef077ffd

avformat/segafilmenc: Add deinit function Prevents memleaks when the trailer is never written or when shifting the data fails when writing the trailer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Andreas Rheinhardt

commit sha f701414bd54639f0b0cc72e129ac1a6e9141c6f8

avformat/mux: Cosmetics Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha 618a9bea65112a27a106e02ada3ae475cc8ac1ac

avformat/mvdec: Check stream numbers Fixes: null pointer dereference Fixes: 20768/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5638648978735104.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha f8a0e9f9f71cf5650bdc250ff7475e0f7d8e8420

avcodec/magicyuv: Check that there are enough lines for interlacing to be possible Fixes: out of array access Fixes: 20763/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5759562508664832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Brad Smith

commit sha 36451f916a93b7edd6e1810f4102b1e6269bea6a

configure: Enable section_data_rel_ro for OpenBSD aarch64 / arm Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

push time in 3 days

pull request commentjsdom/jsdom

fix: support wildcard for access-control-allow-headers

There seems to be some linting issues with this PR. Could you fix them? (See Travis CI for more info.)

We should also ideally have some tests for this, but it might be tricky as we need an HTTP server. Could you look at https://github.com/jsdom/jsdom/blob/master/Contributing.md#web-platform-feature-tests (you could add your test to to-upstream) and also maybe existing tests in WPT that use Python handlers?

matveyok

comment created time in 3 days

issue commentwhatwg/html

"the document has finished loading"

This description of the load event in the index is not meant as a precise specification of when it should be fired, but as an intuitive explanation of what the event means. With regards to when precisely it should be fired, look for cross references of the load event in the spec. In particular, you may be most interested in https://html.spec.whatwg.org/multipage/parsing.html#the-end:event-load.

amn

comment created time in 3 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 7e08a9237080cd8fbe0fa846548ff185e682e92f

avfilter/vf_convolve: reset fft/ifft pointers after free

view details

push time in 3 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 2e6db121a89c59fc744415d3e3e89c432d992207

doc/filters: mention commands for v360 filter

view details

Paul B Mahol

commit sha ad65a15328c6db87e8f3ec94cc9fc16e1e241f3d

doc/filters: split tblend from blend

view details

push time in 3 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 022796c82f5dde0079d5cfdb7fd8ead3e8bc446d

avcodec/utvideodec: add support for UQY0

view details

push time in 3 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 08a21c1fd8cf4dc25edd0a6d1e9474b151bb54a2

avfilter/vf_v360: handle gracefully invalid values for rorder option

view details

Paul B Mahol

commit sha b484eb2556608d6a818b27c705d959c1c2cd44ee

avfilter/vf_v360: add basic commands support

view details

push time in 3 days

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha 35c2e3ce0bf9884893f88391ec35cd39be7b8f4c

Updates

view details

push time in 3 days

push eventTimothyGu/dotfiles

Timothy Gu

commit sha 018a568e723b8754c167d4d48698255dc8dca9ec

Try tmux

view details

push time in 4 days

push eventTimothyGu/dotfiles

Timothy Gu

commit sha 419117637020539c8a0671f85f9afc4060a5af58

Add more pushInsteadOf

view details

push time in 4 days

push eventautotools-mirror/gettext

Bruno Haible

commit sha c8fe23519e66963a2eb837a2c1209ffae8300ddd

urlget: Follow the "privacy by design" principle. * gettext-tools/src/gnu/gettext/GetURL.java (fetch): Override the User-Agent string, so as not to reveal the Java version to the server.

view details

Bruno Haible

commit sha 284d55ec4c24479789b250bdcba9e3782cca2994

urlget: Follow the "privacy by design" principle. * gettext-tools/src/urlget.c (fetch): Override the User-Agent string, so as not to reveal the program version to the server. For wget, use long options.

view details

push time in 4 days

push eventFFmpeg/FFmpeg

Anamitra Ghorui

commit sha 177c68e3496e0d807641110f2a76d25ad71e45bb

avcodec/Makefile: remove bogus/duplicate PNG parser entry

view details

push time in 4 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 72b6c8c99f4b3bcdeb4f3fb594c0802ac3bf10f8

avfilter: add Contrast Adaptive Sharpen video filter

view details

push time in 4 days

push eventFFmpeg/FFmpeg

Zane van Iperen

commit sha 8c4443cbcfe7e681567ee203da4cb4aecdd25a12

changelog: add adpcm_ima_ssi decoder and kvag demuxer Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>

view details

Zane van Iperen

commit sha c6cc9d9cd744c0294e46c861781675ffeb0826e6

doc: add adpcm_ima_{ssi,apm} Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>

view details

push time in 4 days

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha 899cd26ac34ea14db8f85739439b89313074d79e

Updates

view details

push time in 4 days

delete branch EB-Forks/webidl2js

delete branch : fix/circular-convert-and-is

delete time in 4 days

push eventjsdom/webidl2js

ExE Boss

commit sha 27f4ba9f30617692cd9129934754454c6c00d382

Don’t break on circular type dependencies (#168) This fixes up 8d89fc92f143d8f97620cfcacf5632bb2070eaea. The bug was encountered when a circular dependency between UIEvent and Window was introduced, causing convertWindow to become undefined.

view details

push time in 4 days

PR merged jsdom/webidl2js

Reviewers
fix: Don’t break on circular type dependencies

This was encountered while working on https://github.com/jsdom/jsdom/pull/2835, where a circular dependency between UIEvent and Window causes convertWindow to be undefined.

I forgot to fix this in #154.

+65 -71

1 comment

3 changed files

ExE-Boss

pr closed time in 4 days

pull request commentjsdom/webidl2js

fix: Don’t break on circular type dependencies

You might want to tweak your the settings of your browser/extension a bit, as your comments are almost fully composed of non-breaking spaces:

This&nbsp;was&nbsp;encountered while&nbsp;working on&nbsp;<https://github.com/jsdom/jsdom/pull/2835>, where&nbsp;a&nbsp;circular&nbsp;dependency between&nbsp;`UIEvent` and&nbsp;`Window` causes&nbsp;`convertWindow` to&nbsp;be&nbsp;`undefined`.

I&nbsp;forgot to&nbsp;fix&nbsp;this in&nbsp;#154.
ExE-Boss

comment created time in 4 days

pull request commentjsdom/jsdom

Implement Range and Selection APIs

There's probably no way for us to implement getClientRects, since we don't have a layout engine. See https://github.com/jsdom/jsdom#unimplemented-parts-of-the-web-platform.

pmdartus

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 describe("WebIDL unsigned long long type", () => {     ], { enforceRange: true }, "with [EnforceRange]"); }); -describe.skip("WebIDL unsigned long long test cases hard to pass within JavaScript", () => {+describeBigInt("WebIDL unsigned long long test cases hard to pass within JavaScript", () => {     // See the README for more details.     const sut = conversions["unsigned long long"];      generateTests(sut, [-        [18446744073709552000, -18446744073709552000]+        // -18446744073709551232 converted to 64 bits is 384+        [18446744073709552000, 384]

Let's add 9223372036854776000 as a test case also. (Should be the number itself.) The suggestion with stringification also applies here.

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 describe("WebIDL unsigned long long type", () => {     ], { enforceRange: true }, "with [EnforceRange]"); }); -describe.skip("WebIDL unsigned long long test cases hard to pass within JavaScript", () => {+describeBigInt("WebIDL unsigned long long test cases hard to pass within JavaScript", () => {

Ditto. Coalesce this with the normal unsigned long long tests above.

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 describe("WebIDL long long type", () => {     ], { enforceRange: true }, "with [EnforceRange]"); }); -describe.skip("WebIDL long long test cases hard to pass within JavaScript", () => {+describeBigInt("WebIDL long long test cases hard to pass within JavaScript", () => {

Coalesce this test suite with the "WebIDL long long type" suite above.

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 describe("WebIDL long long type", () => {     ], { enforceRange: true }, "with [EnforceRange]"); }); -describe.skip("WebIDL long long test cases hard to pass within JavaScript", () => {+describeBigInt("WebIDL long long test cases hard to pass within JavaScript", () => {     // See the README for more details.     const sut = conversions["long long"];      generateTests(sut, [-        [18446744073709552000, -18446744073709552000]+        // -18446744073709551232 converted to 64 bits is 384+        [18446744073709552000, 384]

Let's add 9223372036854776000 as a test case also. Result should be -9223372036854775616 (=== -9223372036854776000).

Hmm, it seems like by this point it would be better to test the stringified result also… (should be "-9223372036854776000").

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 function createIntegerConversion(bitLength, typeOpts) {     }; } +/* globals BigInt */+const createLongLongConversion = typeof BigInt !== "function" || typeof BigInt(0) !== "bigint" ?+    createIntegerConversion : (bitLength, { unsigned }) => {+        const upperBound = 9007199254740991; /* Math.pow(2, 53) - 1 */+        const lowerBound = unsigned ? 0 : -9007199254740991; /* -Math.pow(2, 53) + 1 */+        const asBigIntN = (unsigned ? BigInt.asUintN : BigInt.asIntN).bind(BigInt, bitLength);

Nit: Let's spare some binding, and just do

const asBigIntN = unsigned ? BigInt.asUintN : BigInt.asIntN;
// ...
xBigInt = asBigIntN(xBigInt, bitLength);
ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 function createIntegerConversion(bitLength, typeOpts) {     }; } +/* globals BigInt */+const createLongLongConversion = typeof BigInt !== "function" || typeof BigInt(0) !== "bigint" ?+    createIntegerConversion : (bitLength, { unsigned }) => {+        const upperBound = 9007199254740991; /* Math.pow(2, 53) - 1 */

You may wish to instead use Number.MAX_SAFE_INTEGER, which is defined as equivalent to 2<sup>53</sup> – 1, and Number.MIN_SAFE_INTEGER below.

Up to you. If you decide to keep the current number, having the name of the constant in a comment would help as well.

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 function createIntegerConversion(bitLength, typeOpts) {     }; } +/* globals BigInt */

You could add env: es2020 to eslintrc instead.

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 Derived types, such as nullable types, promise types, sequences, records, etc. a  ### A note on the `long long` types -The `long long` and `unsigned long long` Web IDL types can hold values that cannot be stored in JavaScript numbers, so the conversion is imperfect. For example, converting the JavaScript number `18446744073709552000` to a Web IDL `long long` is supposed to produce the Web IDL value `-18446744073709551232`. Since we are representing our Web IDL values in JavaScript, we can't represent `-18446744073709551232`, so we instead the best we could do is `-18446744073709552000` as the output.+The `long long` and `unsigned long long` Web IDL types can hold values that cannot be stored in JavaScript numbers, so the conversion is imperfect. For example, converting the JavaScript number `18446744073709552000` to a Web IDL integer is supposed to produce the Web IDL value `-18446744073709551232`. Since we are representing our Web IDL values in JavaScript, we can't represent `-18446744073709551232`, so we instead the best we could do is `-18446744073709552000` as the output. -This library actually doesn't even get that far. Producing those results would require doing accurate modular arithmetic on 64-bit intermediate values, but JavaScript does not make this easy. We could pull in a big-integer library as a dependency, but in lieu of that, we for now have decided to just produce inaccurate results if you pass in numbers that are not strictly between `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER`.+In engines with native BigInt support, `18446744073709552000` is correctly converted to `-18446744073709551232`, which becomes `384` when interpreted as a 64-bit integer.

No need to say this, if we require BigInt as suggested.

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

feat: Use `bigint` for 64‑bit integer conversion

 Derived types, such as nullable types, promise types, sequences, records, etc. a  ### A note on the `long long` types -The `long long` and `unsigned long long` Web IDL types can hold values that cannot be stored in JavaScript numbers, so the conversion is imperfect. For example, converting the JavaScript number `18446744073709552000` to a Web IDL `long long` is supposed to produce the Web IDL value `-18446744073709551232`. Since we are representing our Web IDL values in JavaScript, we can't represent `-18446744073709551232`, so we instead the best we could do is `-18446744073709552000` as the output.+The `long long` and `unsigned long long` Web IDL types can hold values that cannot be stored in JavaScript numbers, so the conversion is imperfect. For example, converting the JavaScript number `18446744073709552000` to a Web IDL integer is supposed to produce the Web IDL value `-18446744073709551232`. Since we are representing our Web IDL values in JavaScript, we can't represent `-18446744073709551232`, so we instead the best we could do is `-18446744073709552000` as the output.

Well, this actually just seems to be wrong. I think it might've meant to say the following:

For example, converting the JavaScript number 9223372036854776000 [= 2<sup>63</sup> cast to double] to a Web IDL integer is supposed to produce the Web IDL value -9223372036854775616 [= 9223372036854776000 – 2<sup>64</sup>]. Since we are representing our Web IDL values in JavaScript, we can't represent -9223372036854775616, so we instead the best we could do is -9223372036854776000 as the output.

/cc @domenic to confirm?

ExE-Boss

comment created time in 4 days

Pull request review commentjsdom/webidl-conversions

fix(type): Use correct object detection

 function type(V) {             // Per ES spec, typeof returns an implemention-defined value that is not any of the existing ones for             // uncallable non-standard exotic objects. Yet Type() which the Web IDL spec depends on returns Object for             // such cases. So treat the default case as an object.-            return "Object";++            // This will also be hit for objects with the `[[IsHTMLDDA]]` internal slot,+            // which causes typeof to return "undefined".+            try {+                // %ObjProto_valueOf% acts an identity function for real objects+                if (objValueOf.call(V) === V) {+                    return "Object";+                }+            } catch (err) { /* Ignore */ }+            return "Unknown";

It seems like we don't have to add this try-catch block, given that we have tightened up the check for Undefined values up above. "Unknown" is not a ECMA-262 value type, and we can assume that our host implements ECMA-262.

ExE-Boss

comment created time in 5 days

push eventFFmpeg/FFmpeg

Linjie Fu

commit sha 1c37cad084041c74c6f21505e24670611e6f28a5

lavu/pix_fmt: add new pixel format y210 Add some packed 4:2:2 10-bit pixel formats for hardware decode support in VAAPI and QSV. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha d2aa1fbfd4c4599fc0ae8f32b5e95ad65546944b

swscale: Add swscale input support for Y210LE Add swscale input support for Y210LE, output support and fate test could be added later if there is requirement for software CSC to this packed format. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha f4cd4017bff0bcfb252bc1805ed40e738c6a4803

lavu/hwcontext_vaapi: add vaapi_format_map support for Y210 VA_RT_FORMAT describes the desired sampling format for surface. When creating surface, VA_RT_FORMAT will be used firstly to choose the expected fourcc/media_format for the surface. And the fourcc will be revised by the value of VASurfaceAttribPixelFormat. Add vaapi_format_map support for new pixel_format Y210. This is fundamental for both VA-API and QSV. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha aa6b2e1604c285e16109d0377e0bb5e8b4fbe13e

lavc/vaapi_hevc: extend parameter buffer to ParameterBufferHEVCExtension Extend ParameterBufferHEVC to ParameterBufferHEVCExtension for both VAPicture and VASlice. Pass Range Extension flags to support the decode for HEVC REXT. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha 0d83fcc07b31c528c4fb95528b8e50c440eefc87

lavc/hevc_ps: parse constraint flags for HEVC REXT Parse all the constraint flags according to ITU-T Rec. H.265 (02/2018). They have to be passed to hw decoders to determine the exact profile for Range Extension HEVC. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha 85cc7bcd4cf1e1963c22c1ea1594160a33da4fee

lavc/vaapi_hevc: add function to find exact va_profile for REXT Add vaapi_parse_rext_profile and use profile constraint flags to determine the exact va_profile for HEVC_REXT. If profile mismatch is allowed, select Main profile by default. Add build object in Makefile for h265_profile_level dependency. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha d2378645fbdd1da7acaa084ddcae90830f54589b

lavc/vaapi_decode: add profile_parser and format map support for HEVC REXT Add function pointer field in vaapi_profile_map[], set profile_parser for HEVC_REXT to find the exact va_profile. Also add format map support. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha 669428ac5d9b39f718e7d46f52410722dd20b94a

lavc/hevcdec: add 4:2:2 8-bit/10-bit VAAPI decode support Add decode support for 4:2:2 8-bt and 10-bit HEVC Range Extension clips. Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Linjie Fu

commit sha a7b92cb55907fd33aa75eabea95db39ba949cb99

lavc/vaapi_decode: add decode support for HEVC_MAIN_STILL_PICTURE Signed-off-by: Linjie Fu <linjie.fu@intel.com>

view details

Mark Thompson

commit sha bc9b6358fb7315c0173de322472641766f6289da

hwcontext_vaapi: Only accept a render node when deriving from DRM device If we are given a non-render node, try to find the matching render node and fail if that isn't possible. libva will not accept a non-render device which is not DRM master, because it requires legacy DRM authentication to succeed in that case: <https://github.com/intel/libva/blob/master/va/drm/va_drm.c#L68-L75>. This is annoying for kmsgrab because in most recording situations DRM master is already held by something else (such as a windowing system), leading to device derivation not working and forcing the user to create the target VAAPI device separately.

view details

push time in 5 days

push eventFFmpeg/FFmpeg

Marton Balint

commit sha b96bc946f219fbd28cffc1efea78fd42f34148ec

avformat/libsrt: fix timeout unit confusion between milisec and microsec Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha 006744bdbd83d98bc71cb041d9551bf6a64b45a2

avformat/libsrt: fix name of timeout option rw_timeout is the generic URLcontext option, not the protocol specific timeout option, also ?rw_timeout never worked because ?timeout was parsed instead. Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha aab9133d919bec4af54a06216d8629ebe4fb8f74

avformat/libsrt: fix checking connection result in non-blocking mode After f8990c5f414d4575415e2a3981c3b142222ca3d4 we properly set non-blocking mode which makes the connect() call return always 0 even if no connection can be established. Fix this by always doing a poll after calling connect(). Also there was some leftover copy paste code which checks for various errors which are simply not possible with SRT. Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha c112fae6603f8be33cf1ee2ae390ec939812f473

avformat/libsrt: poll for error conditions as well Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha 86a7b77b60488758e0c080882899c32c4a5ee017

avformat/libsrt: small fixes in libsrt_neterrno() Return os error code if available, check for both SRT_EASYNCRCV and SRT_EASYNCSND when transforming them to EAGAIN and only display error if it is not EAGAIN. Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha 7cc7680a802c1eee9e334a0653f2347e9c0922a4

avformat/libsrt: send non-blocking mode on both the listen and the connect socket Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha 449e984192d94ac40713e9217871c884657dc79d

avformat/libsrt: use listen_timeout for listening Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha 290a35aefed250a797449c34d2f9e5af0c4e006a

avformat/libsrt: make avformat connect timeout 0 by default Otherwise the user is not able to override the SRT API connect timeout above 5 sec without also setting the timeout option. Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Marton Balint

commit sha 45085d8d3cd977a0b2c2677dab9643be9adbb56e

doc/protocols: clarify SRT timeout options docs Signed-off-by: Marton Balint <cus@passwd.hu>

view details

Kirill Savkov

commit sha 4627a56d46a07dd2384c92310147cabac98b4539

avcodec/libzvbi-teletextdec: add option to set default G0 character set Signed-off-by: Kirill Savkov <k.savkov@inventos.ru> Signed-off-by: Marton Balint <cus@passwd.hu>

view details

push time in 5 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha e6ea0e7429924bd8d9f20089e57540208abf8a01

avfilter/vf_v360: improve fisheye_to_xyz() output

view details

Paul B Mahol

commit sha 90913abc2e1456edd224c55729a7334fbc78fd87

avfilter/vf_v360: improve dfisheye_to_xyz() output

view details

push time in 5 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha ebc8806b9fcc8a2130773ddfd2f1678f78c24200

avfilter/vf_v360: improve equirect_to_xyz() quality

view details

Paul B Mahol

commit sha 9e0ddb5e80542d72059f9d817722a6e386ecc037

avcodec/ac3_parser: recognize LE bitstream variant

view details

push time in 5 days

push eventuclaacm/mentorq

Timothy Gu

commit sha 274a8232a66a14eeeecd49696176d087aa5f3e99

Get rid of tabs in .yml

view details

Timothy Gu

commit sha 67a82cabbdf36b1a20abdd1ffe8e2eae1cb38351

Set isResolved to true in Ticket.resolve

view details

Timothy Gu

commit sha 0dfa61c4b068a783328e08cac6f09180c61c09c5

Add restart: always stanza to docker-compose

view details

Timothy Gu

commit sha 11cb74a44b9c310faba0e0bb93fc999507856719

Get rid of _id hacks everywhere

view details

push time in 5 days

push eventFFmpeg/FFmpeg

James Almer

commit sha 7098989e708396c542a5d10176e96c56e8b704b6

avformat/dashenc: write the styp box when the first frame of a segment is ready This ensures it's written at the beginning of a segment in non streaming mode when segment duration differs from fragment duration. Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha dbd02443ae08126a498ddfaf9e7f044471e1ac1c

avformat/dashenc: write a capture time Producer Reference Time element when none is provided by the encoder This way, the element will be present in any scenario when the write_prft option is used. Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha 5dda6c173f8c8d169f934731e31d34c1fe5da75a

avformat/dashenc: always attempt to enable prft in ldash mode Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha c6666894914ba8be1193ed81e9b6b737c68c29b6

avcodec: add an AVCodecContext field to signal types of packet, frame, and coded stream side data to export Add an initial mvs flag to is, analog to the export_mvs flags2 one. Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha d005a7cdfd8762d436dc5d3ec12bab4f96781c4f

avcodec: add an AVCodecContext flag to export PRFT side data on demand Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha 3d4510384dd39a2ffc93c4bb94e63e232deff0ad

avcodec/libx264: add a check for the prft AVCodecContext export_side_data flag Signed-off-by: James Almer <jamrial@gmail.com>

view details

James Almer

commit sha c48e5431c8edeae1e10482df5e179a9c02479662

avcodec: add some documentation to the AVProducerReferenceTime struct Signed-off-by: James Almer <jamrial@gmail.com>

view details

push time in 5 days

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha 16f58ee05c6a24181a1d7447873d300da6001f7b

Updates

view details

push time in 5 days

push eventFFmpeg/FFmpeg

Andreas Rheinhardt

commit sha c790500644c9f09a68611dc79168c55b8dd11a05

avformat/segafilmenc: Remove redundant checks If an audio stream is present, the Sega FILM muxer checks for its compability with the container during init, so that the very same check needn't be repeated during writing the trailer. Essentially the same is true for the presence of a video stream: It has already been checked during init. Furthermore, after the check for the presence of a video stream succeeded, a pointer is set to point to the video stream. Yet said pointer (which was NULL before) will be derefenced anyway regardless of the result of the check. Coverity thus complained about this in CID 1434155 and removing this pointless check will also fix this issue. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Zane van Iperen

commit sha 3de8ca21ab15ba20a3ca40d4ef5bc5cdc1d6dc62

fate/adpcm: add adpcm_ima_apm tests Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Dale Curtis

commit sha a0faf0db4f9f85ce2b8e00660c4fd884a347ca19

avformat/utils: Don't trigger errors for multiple id3 tags. Such errors may make sense for specific formats, but general parsing logic shouldn't be treating these as errors regardless of the error recognition mode. Fixes loading of the following wave when using -err_detect explode: https://cs.chromium.org/chromium/src/third_party/blink/web_tests/external/wpt/webaudio/resources/4ch-440.wav Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

push time in 6 days

push eventuclaacm/mentorq

Timothy Gu

commit sha 348a87e01087e8ff509e2e8f21f7b573311e27bc

fix brokenness

view details

push time in 6 days

push eventuclaacm/mentorq

Timothy Gu

commit sha c86bdeec3561cf7c28e83ed9b075abb9f6c5547d

Update for HOTH 7

view details

push time in 6 days

push eventuclaacm/mentorq

Timothy Gu

commit sha b86500e9525b8347a9ff704a26a93badf4498baf

fix nginx

view details

push time in 6 days

push eventuclaacm/mentorq

Timothy Gu

commit sha fe0f2f1aaef49f670e99ad11cc572275b6a11f13

Upgrade packages

view details

Timothy Gu

commit sha 01d67f1bf7af9de4b52b795ef1ef9329b770c897

Update nginx config

view details

push time in 6 days

push eventautotools-mirror/autoconf

Paul Eggert

commit sha 2864a5dbbfeb5383451ff1858cc16cdae05d738c

Remove definition of _DARWIN_USE_64_BIT_INODE It’s not needed in currently-supported macOS versions, and was problematic anyway in MacOS X 10.5 which was the only version that could use it. Problem reported by Peter Eisentraut in: https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html * lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Don’t define _DARWIN_USE_64_BIT_INODE.

view details

Paul Eggert

commit sha 98d67d660d0f1e5ecb6549d2daadbd4257570d27

Mention 32-bit GNU/Linux 64-bit inodes * lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): In a comment, mention 64-bit inode problem on 32-bit GNU/Linux. This is taken from Gnulib.

view details

push time in 6 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha c116dd84682a2b2fb2880a75a8dbf6367f671b17

avcodec/apedec: fix decoding 3800 version with 2000 compression level

view details

push time in 6 days

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha e97a5f98da53e2af792330d39f8e05913d6388d4

Updates

view details

push time in 6 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 8e197a96388a0891b05e60dd79ef3817f7662cba

avcodec/dxv: make prev variable unsigned

view details

push time in 7 days

push eventFFmpeg/FFmpeg

Michael Niedermayer

commit sha 4c31db5a32724662ac97448fd6ae2bfa42ffd732

avcodec/cdtoons: Correct several end of data checks in cdtoons_render_sprite() No testcases, found by code review when debuging issue found by oss-fuzz Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha d2aff350bc8250d1efe04e90822f49f4b8aea9ae

avcodec/cdtoons: Fix off by 4 check on diff_size Fixes: out of array read Fixes: 20742/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDTOONS_fuzzer-5738148607033344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

Michael Niedermayer

commit sha 051d11f659455f38be7ce40e2dc9d03b082dcd4d

avcodec/pcm: Fix invalid shift in AV_CODEC_ID_PCM_LXF Fixes: left shift of 233 by 24 places cannot be represented in type 'int' Fixes: 20736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_LXF_fuzzer-4829212685107200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

view details

push time in 7 days

push eventFFmpeg/FFmpeg

Zane van Iperen

commit sha af65357207216f40b81fe2195eeed59745a09fdb

avcodec: add decoder for Rayman 2's ADPCM variant Adds support for the ADPCM variant used in Rayman 2's files. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>

view details

Zane van Iperen

commit sha 55af03dbb5fb0758cda8dc69336c54c057917e0a

avformat: add demuxer for Rayman 2's APM format Adds support for the APM file format used by Ubisoft's Rayman 2. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>

view details

Paul B Mahol

commit sha 553d836d62732fa46752e7f9a670f46a1435f988

avcodec/adpcm: cosmetics; reindent

view details

push time in 7 days

Pull request review commentjsdom/webidl-conversions

fix: Make `TypedArray` conversion unforgeable

 const bufferSourceConstructors = [  const bufferSourceCreators = []; for (const constructor of bufferSourceConstructors) {+    const { name } = constructor;     bufferSourceCreators.push(         {-            typeName: constructor.name,-            label: `${constructor.name} same realm`,+            typeName: name,+            label: `${name} same realm`,             creator: () => new constructor(new ArrayBuffer(0))         },         {-            typeName: constructor.name,-            label: `${constructor.name} different realm`,-            creator: () => vm.runInContext(`new ${constructor.name}(new ArrayBuffer(0))`, differentRealm)+            typeName: name,+            label: `${name} different realm`,+            creator: () => vm.runInContext(`new ${name}(new ArrayBuffer(0))`, differentRealm)+        },+        {+            typeName: `forged ${name}`,

Can we keep typeName the original constructor.name, just like all the other test cases?

ExE-Boss

comment created time in 7 days

push eventuclaacm/hack.uclaacm.com

Hack Bot

commit sha 757898f9e8ebd9b2a352d1c2597459200255a406

Updates

view details

push time in 7 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are

The ES spec calls them traps rather than hooks.

domenic

comment created time in 8 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are+defined in this manner because the ECMAScript specification includes special treatment for+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment+intact.++The proxy traps used by observable array exotic objects work to ensure a number of invariants beyond+those of normal <code>Array</code> instances:++*   The arrays have no holes, i.e. every property in the inclusive range 0 through+    <code>observableArray.length</code> will be filled with a value compatible with the specified+    Web IDL type, and no [=array index=] properties will exist outside that range.+*   The property descriptors for important properties cannot be changed from their default+    configuration; indexed properties always remain as configurable, enumerable, and writable data+    properties, while the <code>length</code> property remains as a non-configurable,+    non-enumerable, and writable data property.+*   Adding additional properties to the array cannot be prevented using, for example,+    <code>Object.preventExtensions()</code>.++<div algorithm>+    To <dfn lt="creating an observable array exotic object">create an observable array exotic object</dfn>+    in a [=Realm=] |realm|, given Web IDL type |T| and algorithms |setAlgorithm| and |deleteAlgorithm|:++    1.  Let |innerArray| be [=!=] [$ArrayCreate$](0).+    1.  Let |handler| be [$ObjectCreate$](<emu-val>null</emu-val>, « \[[Type]], \[[SetAlgorithm]], \[[DeleteAlgorithm]], \[[BackingList]] »).+    1.  Set |handler|.\[[Type]] to |T|.+    1.  Set |handler|.\[[SetAlgorithm]] to |setAlgorithm|.+    1.  Set |handler|.\[[DeleteAlgorithm]] to |deleteAlgorithm|.+    1.  Let |defineProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-defineProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "defineProperty", |defineProperty|).+    1.  Let |deleteProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-deleteProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "deleteProperty", |deleteProperty|).+    1.  Let |get| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-get]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "get", |get|).+    1.  Let |getOwnPropertyDescriptor| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-getOwnPropertyDescriptor]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "getOwnPropertyDescriptor", |getOwnPropertyDescriptor|).+    1.  Let |has| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-has]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "has", |has|).+    1.  Let |preventExtensions| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-preventExtensions]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "preventExtensions", |preventExtensions|).+    1.  Let |set| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-set]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "set", |set|).+    1.  Let |ownKeys| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-ownKeys]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "ownKeys", |ownKeys|).+    1.  Return [=!=] [$ProxyCreate$](|innerArray|, |handler|).+</div>++<h4 id="es-observable-array-defineProperty"><code>defineProperty</code></h4>++<div algorithm="observable array exotic object defineProperty trap">+    The steps for the <code>defineProperty</code> proxy trap for+    [=observable array exotic objects=], given |O|, |P|, and |descriptorObj| are as follows:++    1.  Let |handler| be the <emu-val>this</emu-val> value.+    1.  Let |descriptor| be [=?=] [$ToPropertyDescriptor$](|descriptorObj|).+    1.  If |P| is "length", then:+        1.  If [=!=] [$IsAccessorDescriptor$](|descriptor|) is <emu-val>true</emu-val>, then return+            <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Configurable]] field and |descriptor|.\[[Configurable]] is+            <emu-val>true</emu-val>, return <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Enumerable]] field and |descriptor|.\[[Enumerable]] is+            <emu-val>true</emu-val>, return <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Writable]] field and |descriptor|.\[[Writable]] is+            <emu-val>false</emu-val>, return <emu-val>false</emu-val>.+        1.  If |descriptor|.\[[Value]] is present, then return the result of+            [=observable array exotic object/setting the length=] given |handler| and+            |descriptor|.\[[Value]].+        1.  Return <emu-val>true</emu-val>.+    1. If |P| [=is an array index=], then:+        1.  If [=!=] [$IsAccessorDescriptor$](|descriptor|) is <emu-val>true</emu-val>, then return+            <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Configurable]] field and |descriptor|.\[[Configurable]] is+            <emu-val>false</emu-val>, return <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Enumerable]] field and |descriptor|.\[[Enumerable]] is+            <emu-val>false</emu-val>, return <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Writable]] field and |descriptor|.\[[Writable]] is+            <emu-val>false</emu-val>, return <emu-val>false</emu-val>.+        1.  If |descriptor|.\[[Value]] is present, then return the result of+            [=observable array exotic object/setting the indexed value=] given |handler|, |P|, and+            |descriptor|.\[[Value]].+    1. Return [=?=] |O|.\[[DefineOwnProperty]](|P|, |descriptor|).+</div>++<h4 id="es-observable-array-deleteProperty"><code>deleteProperty</code></h4>++<div algorithm="observable array exotic object deleteProperty trap">+    The steps for the <code>deleteProperty</code> proxy trap for+    [=observable array exotic objects=], given |O| and |P|, are as follows:++    1.  Let |handler| be the <emu-val>this</emu-val> value.+    1.  If |P| is "length", then return <emu-val>false</emu-val>.+    1.  If |P| [=is an array index=], then:+        1.  Let |oldLen| be |handler|.\[[BackingList]]'s [=list/size=].+        1.  Let |index| be [=!=] [$ToUint32$](|P|).+        1.  If |index| ≠ |oldLen| &minus; 1, then return+            <emu-val>false</emu-val>.+        1.  Perform the algorithm steps given by |handler|.\[[DeleteAlgorithm]], given+            |handler|.\[[BackingList]][|index|] and |index|.

Can we just say

Perform handler.[[DeleteAlgorithm]](handler.[[BackingList]][index], index).

domenic

comment created time in 8 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are+defined in this manner because the ECMAScript specification includes special treatment for+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment+intact.++The proxy traps used by observable array exotic objects work to ensure a number of invariants beyond+those of normal <code>Array</code> instances:++*   The arrays have no holes, i.e. every property in the inclusive range 0 through+    <code>observableArray.length</code> will be filled with a value compatible with the specified+    Web IDL type, and no [=array index=] properties will exist outside that range.+*   The property descriptors for important properties cannot be changed from their default+    configuration; indexed properties always remain as configurable, enumerable, and writable data+    properties, while the <code>length</code> property remains as a non-configurable,+    non-enumerable, and writable data property.+*   Adding additional properties to the array cannot be prevented using, for example,+    <code>Object.preventExtensions()</code>.++<div algorithm>+    To <dfn lt="creating an observable array exotic object">create an observable array exotic object</dfn>+    in a [=Realm=] |realm|, given Web IDL type |T| and algorithms |setAlgorithm| and |deleteAlgorithm|:++    1.  Let |innerArray| be [=!=] [$ArrayCreate$](0).+    1.  Let |handler| be [$ObjectCreate$](<emu-val>null</emu-val>, « \[[Type]], \[[SetAlgorithm]], \[[DeleteAlgorithm]], \[[BackingList]] »).+    1.  Set |handler|.\[[Type]] to |T|.+    1.  Set |handler|.\[[SetAlgorithm]] to |setAlgorithm|.+    1.  Set |handler|.\[[DeleteAlgorithm]] to |deleteAlgorithm|.+    1.  Let |defineProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-defineProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "defineProperty", |defineProperty|).+    1.  Let |deleteProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-deleteProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "deleteProperty", |deleteProperty|).+    1.  Let |get| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-get]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "get", |get|).+    1.  Let |getOwnPropertyDescriptor| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-getOwnPropertyDescriptor]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "getOwnPropertyDescriptor", |getOwnPropertyDescriptor|).+    1.  Let |has| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-has]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "has", |has|).+    1.  Let |preventExtensions| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-preventExtensions]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "preventExtensions", |preventExtensions|).+    1.  Let |set| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-set]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "set", |set|).+    1.  Let |ownKeys| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-ownKeys]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "ownKeys", |ownKeys|).+    1.  Return [=!=] [$ProxyCreate$](|innerArray|, |handler|).+</div>++<h4 id="es-observable-array-defineProperty"><code>defineProperty</code></h4>++<div algorithm="observable array exotic object defineProperty trap">+    The steps for the <code>defineProperty</code> proxy trap for+    [=observable array exotic objects=], given |O|, |P|, and |descriptorObj| are as follows:++    1.  Let |handler| be the <emu-val>this</emu-val> value.+    1.  Let |descriptor| be [=?=] [$ToPropertyDescriptor$](|descriptorObj|).+    1.  If |P| is "length", then:+        1.  If [=!=] [$IsAccessorDescriptor$](|descriptor|) is <emu-val>true</emu-val>, then return+            <emu-val>false</emu-val>.+        1.  If |descriptor| has a \[[Configurable]] field and |descriptor|.\[[Configurable]] is+            <emu-val>true</emu-val>, return <emu-val>false</emu-val>.

More concise wording:

If descriptor.[[Configurable]] is present and has the value true, return false.

or

If descriptor.[[Configurable]] is present and it is true, return false.

domenic

comment created time in 8 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are+defined in this manner because the ECMAScript specification includes special treatment for+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment+intact.++The proxy traps used by observable array exotic objects work to ensure a number of invariants beyond+those of normal <code>Array</code> instances:++*   The arrays have no holes, i.e. every property in the inclusive range 0 through+    <code>observableArray.length</code> will be filled with a value compatible with the specified+    Web IDL type, and no [=array index=] properties will exist outside that range.+*   The property descriptors for important properties cannot be changed from their default+    configuration; indexed properties always remain as configurable, enumerable, and writable data+    properties, while the <code>length</code> property remains as a non-configurable,+    non-enumerable, and writable data property.+*   Adding additional properties to the array cannot be prevented using, for example,+    <code>Object.preventExtensions()</code>.++<div algorithm>+    To <dfn lt="creating an observable array exotic object">create an observable array exotic object</dfn>+    in a [=Realm=] |realm|, given Web IDL type |T| and algorithms |setAlgorithm| and |deleteAlgorithm|:++    1.  Let |innerArray| be [=!=] [$ArrayCreate$](0).+    1.  Let |handler| be [$ObjectCreate$](<emu-val>null</emu-val>, « \[[Type]], \[[SetAlgorithm]], \[[DeleteAlgorithm]], \[[BackingList]] »).+    1.  Set |handler|.\[[Type]] to |T|.+    1.  Set |handler|.\[[SetAlgorithm]] to |setAlgorithm|.+    1.  Set |handler|.\[[DeleteAlgorithm]] to |deleteAlgorithm|.+    1.  Let |defineProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-defineProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "defineProperty", |defineProperty|).+    1.  Let |deleteProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-deleteProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "deleteProperty", |deleteProperty|).+    1.  Let |get| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-get]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "get", |get|).+    1.  Let |getOwnPropertyDescriptor| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-getOwnPropertyDescriptor]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "getOwnPropertyDescriptor", |getOwnPropertyDescriptor|).+    1.  Let |has| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-has]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "has", |has|).+    1.  Let |preventExtensions| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-preventExtensions]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "preventExtensions", |preventExtensions|).+    1.  Let |set| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-set]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "set", |set|).+    1.  Let |ownKeys| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-ownKeys]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "ownKeys", |ownKeys|).+    1.  Return [=!=] [$ProxyCreate$](|innerArray|, |handler|).+</div>++<h4 id="es-observable-array-defineProperty"><code>defineProperty</code></h4>++<div algorithm="observable array exotic object defineProperty trap">+    The steps for the <code>defineProperty</code> proxy trap for+    [=observable array exotic objects=], given |O|, |P|, and |descriptorObj| are as follows:++    1.  Let |handler| be the <emu-val>this</emu-val> value.+    1.  Let |descriptor| be [=?=] [$ToPropertyDescriptor$](|descriptorObj|).

Can this ever throw?

domenic

comment created time in 8 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are+defined in this manner because the ECMAScript specification includes special treatment for+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment+intact.++The proxy traps used by observable array exotic objects work to ensure a number of invariants beyond+those of normal <code>Array</code> instances:++*   The arrays have no holes, i.e. every property in the inclusive range 0 through+    <code>observableArray.length</code> will be filled with a value compatible with the specified+    Web IDL type, and no [=array index=] properties will exist outside that range.+*   The property descriptors for important properties cannot be changed from their default+    configuration; indexed properties always remain as configurable, enumerable, and writable data+    properties, while the <code>length</code> property remains as a non-configurable,+    non-enumerable, and writable data property.+*   Adding additional properties to the array cannot be prevented using, for example,+    <code>Object.preventExtensions()</code>.++<div algorithm>+    To <dfn lt="creating an observable array exotic object">create an observable array exotic object</dfn>+    in a [=Realm=] |realm|, given Web IDL type |T| and algorithms |setAlgorithm| and |deleteAlgorithm|:++    1.  Let |innerArray| be [=!=] [$ArrayCreate$](0).+    1.  Let |handler| be [$ObjectCreate$](<emu-val>null</emu-val>, « \[[Type]], \[[SetAlgorithm]], \[[DeleteAlgorithm]], \[[BackingList]] »).+    1.  Set |handler|.\[[Type]] to |T|.+    1.  Set |handler|.\[[SetAlgorithm]] to |setAlgorithm|.+    1.  Set |handler|.\[[DeleteAlgorithm]] to |deleteAlgorithm|.+    1.  Let |defineProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-defineProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "defineProperty", |defineProperty|).+    1.  Let |deleteProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-deleteProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "deleteProperty", |deleteProperty|).+    1.  Let |get| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-get]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "get", |get|).+    1.  Let |getOwnPropertyDescriptor| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-getOwnPropertyDescriptor]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "getOwnPropertyDescriptor", |getOwnPropertyDescriptor|).+    1.  Let |has| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-has]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "has", |has|).+    1.  Let |preventExtensions| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-preventExtensions]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "preventExtensions", |preventExtensions|).+    1.  Let |set| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-set]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "set", |set|).+    1.  Let |ownKeys| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-ownKeys]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "ownKeys", |ownKeys|).

Could we use an alphabetical order here?

domenic

comment created time in 8 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are+defined in this manner because the ECMAScript specification includes special treatment for+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment+intact.++The proxy traps used by observable array exotic objects work to ensure a number of invariants beyond+those of normal <code>Array</code> instances:++*   The arrays have no holes, i.e. every property in the inclusive range 0 through+    <code>observableArray.length</code> will be filled with a value compatible with the specified+    Web IDL type, and no [=array index=] properties will exist outside that range.+*   The property descriptors for important properties cannot be changed from their default+    configuration; indexed properties always remain as configurable, enumerable, and writable data+    properties, while the <code>length</code> property remains as a non-configurable,+    non-enumerable, and writable data property.+*   Adding additional properties to the array cannot be prevented using, for example,+    <code>Object.preventExtensions()</code>.++<div algorithm>+    To <dfn lt="creating an observable array exotic object">create an observable array exotic object</dfn>+    in a [=Realm=] |realm|, given Web IDL type |T| and algorithms |setAlgorithm| and |deleteAlgorithm|:++    1.  Let |innerArray| be [=!=] [$ArrayCreate$](0).+    1.  Let |handler| be [$ObjectCreate$](<emu-val>null</emu-val>, « \[[Type]], \[[SetAlgorithm]], \[[DeleteAlgorithm]], \[[BackingList]] »).+    1.  Set |handler|.\[[Type]] to |T|.+    1.  Set |handler|.\[[SetAlgorithm]] to |setAlgorithm|.+    1.  Set |handler|.\[[DeleteAlgorithm]] to |deleteAlgorithm|.+    1.  Let |defineProperty| be [=!=] [$CreateBuiltinFunction$](the steps from [[#es-observable-array-defineProperty]], « », |realm|).+    1.  Perform [=!=] [$CreateDataProperty$](|handler|, "defineProperty", |defineProperty|).

Use <code> with string literals, per Infra. But I wonder if we could do a spec-for loop, which will be easier to read, IMO.

domenic

comment created time in 8 days

Pull request review commentheycam/webidl

Introduce the observable array type (proxy-based)

 internal method as follows.     1.  Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|). </div> +<h3 id="es-observable-arrays">Observable array exotic objects</h3>++An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript+[=Proxy exotic object=] which is created using the proxy hooks defined in this section. They are+defined in this manner because the ECMAScript specification includes special treatment for+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment+intact.++The proxy traps used by observable array exotic objects work to ensure a number of invariants beyond+those of normal <code>Array</code> instances:++*   The arrays have no holes, i.e. every property in the inclusive range 0 through+    <code>observableArray.length</code> will be filled with a value compatible with the specified

<code>observableArray.length</code> – 1? Or use something like "every property in the interval [0, <code>observableArray.length</code>".

domenic

comment created time in 8 days

push eventFFmpeg/FFmpeg

Anssi Hannula

commit sha 56df8296f5221524bd06e91e6639c08753d1b8a0

avformat/spdifenc: fix TrueHD streams over 48kHz Commit 36e156bef02 ("avformat/spdifenc: fix handling of large TrueHD frame") added an obviously incorrect bitshift that caused incorrect samples-per-frame calculation for TrueHD streams over 48kHz. Fix that.

view details

push time in 8 days

push eventFFmpeg/FFmpeg

Anssi Hannula

commit sha 1d5338e450b18c5715271dee48761e2438d3bd77

avformat/spdifenc: make hd_buf an array This is preparation for adding a second hd_buf in a followup commit. Also, slightly improve the comments for hd_buf_x members to clarify which ones are actually used and kept up-to-date depending on which codec is being muxed.

view details

Anssi Hannula

commit sha 36e156bef02566d70cea46cc5e00b3e5d5ed3286

avformat/spdifenc: fix handling of large TrueHD frames The TrueHD IEC 61937 encapsulation code uses a very naive method of always inserting 24 TrueHD frames evenly in a MAT frame. This does not work for larger frames as they may exceed the size of 1/24th of a MAT frame. To fix that, use the input_timing field in the TrueHD frame to determine the proper position of the TrueHD frame in the MAT frame. That field is basically a dts field, telling the time to feed this frame to the decoder in sample count units. This can cause a TrueHD frame to be split between two MAT frames, so a second concatenation hd_buf is added, alternating with the first buffer. Large frames are preceded by smaller frames that have input_timing values that cause the frames to be sent out faster than the nominal rate (i.e. increasing decoder latency, long decoder buffer), allowing the larger frames to then be sent out slower than the nominal rate as the decoder has enough data buffered to keep it busy.

view details

push time in 8 days

Pull request review commentjsdom/webidl-conversions

fix: Make `TypedArray` conversion unforgeable

+"use strict";

Could you move the tests to the existing buffer-source.js?

ExE-Boss

comment created time in 8 days

PR closed jsdom/webidl2js

Reviewers
feat(Global): Add support for named getters

⚠️ Don’t merge yet as there’s currently bugs with Proxies and with in Node (https://github.com/nodejs/node/issues/30985)

This implements the named properties object.

Needed for https://github.com/jsdom/jsdom/pull/2835

+643 -88

1 comment

4 changed files

ExE-Boss

pr closed time in 8 days

pull request commentjsdom/webidl2js

feat(Global): Add support for named getters

Seeing as this PR isn’t ready yet, I’ll close this as well as other global-related PRs. I’d like to see a single comprehensive PR for the global object rather than pieces of it that independently don’t compose a usable feature.

ExE-Boss

comment created time in 8 days

Pull request review commentnodejs/node

vm: introduce vm.Context

 void ContextifyContext::Init(Environment* env, Local<Object> target) { }  -// makeContext(sandbox, name, origin, strings, wasm);+// makeContext(sandbox, name, origin, strings, wasm, instance); void ContextifyContext::MakeContext(const FunctionCallbackInfo<Value>& args) {   Environment* env = Environment::GetCurrent(args); -  CHECK_EQ(args.Length(), 5);-  CHECK(args[0]->IsObject());-  Local<Object> sandbox = args[0].As<Object>();+  CHECK_EQ(args.Length(), 6); -  // Don't allow contextifying a sandbox multiple times.-  CHECK(-      !sandbox->HasPrivate(-          env->context(),-          env->contextify_context_private_symbol()).FromJust());+  Local<Object> sandbox;+  if (args[5]->IsUndefined()) {+    CHECK(args[0]->IsObject());+    sandbox = args[0].As<Object>();++    // Don't allow contextifying a sandbox multiple times.

The same check should apply to instance as well.

devsnek

comment created time in 8 days

Pull request review commentnodejs/node

vm: introduce vm.Context

 changes:     description: The `breakOnSigint` option is supported now. --> -* `contextifiedObject` {Object} A [contextified][] object as returned by the-  `vm.createContext()` method.+* `context` {vm.Context} A [`vm.Context`][] instance.

Same here. At a minimum, a union type should be used saying that the function accepts both a vm.Context and a contextified object.

devsnek

comment created time in 8 days

Pull request review commentnodejs/node

vm: introduce vm.Context

 The `vm` module enables compiling and running code within V8 Virtual Machine contexts. **The `vm` module is not a security mechanism. Do not use it to run untrusted code**. -JavaScript code can be compiled and run immediately or-compiled, saved, and run later.+JavaScript code can be compiled and run immediately or compiled, saved, and run+later. -A common use case is to run the code in a different V8 Context. This means-invoked code has a different global object than the invoking code.--One can provide the context by [_contextifying_][contextified] an-object. The invoked code treats any property in the context like a-global variable. Any changes to global variables caused by the invoked-code are reflected in the context object.+A common use case is to run code within a different environment. Each context+uses a different V8 Context, meaning that it has a different global object than+the rest of the code. One can provide a context by using the [`vm.Context`][]+constructor.  ```js const vm = require('vm');  const x = 1; -const context = { x: 2 };-vm.createContext(context); // Contextify the object.+const context = new vm.Context();+context.global.x = 2;  const code = 'x += 40; var y = 17;';-// `x` and `y` are global variables in the context.-// Initially, x has the value 2 because that is the value of context.x.-vm.runInContext(code, context);+// `x` and `y` are global variables in the context environment.+// Initially, x has the value 2 because that is the value of context.global.x.+const script = new vm.Script(code);+script.runInContext(context); -console.log(context.x); // 42-console.log(context.y); // 17+console.log(context.global.x); // 42+console.log(context.global.y); // 17  console.log(x); // 1; y is not defined. ``` +## Class: `vm.Context`+<!-- YAML+added: REPLACEME+-->++> Stability: 1 - Experimental++### Constructor: `new vm.Context([options])`+<!-- YAML+added: REPLACEME+-->++* `options` {Object}+  * `name` {string} Human-readable name of the newly created context.+    **Default:** `'VM Context i'`, where `i` is an ascending numerical index of+    the created context.+  * `origin` {string} [Origin][origin] corresponding to the newly created+    context for display purposes. The origin should be formatted like a URL,+    but with only the scheme, host, and port (if necessary), like the value of+    the [`url.origin`][] property of a [`URL`][] object. Most notably, this+    string should omit the trailing slash, as that denotes a path.+    **Default:** `''`.+  * `codeGeneration` {Object}+    * `strings` {boolean} If set to false any calls to `eval` or function+      constructors (`Function`, `GeneratorFunction`, etc) will throw an+      `EvalError`. **Default:** `true`.+    * `wasm` {boolean} If set to false any attempt to compile a WebAssembly+      module will throw a `WebAssembly.CompileError`. **Default:** `true`.++Create a new VM Context. This context will have a unique global object and+variable environment.++### `context.global`+<!-- YAML+added: REPLACEME+-->++* {Object}++The global object of this context.

Is this the actual global object or merely the global this value / global proxy?

If it’s the former, then it would be better to document it clearly (perhaps with appropriate links to external resources), as I doubt most Node.js users have detailed knowledge on the difference. (I.e., most people will probably say that window is the global object.)

If it’s the latter (and I assume this to be the case), then we should call it globalThis in accordance with the global property. I think we could even omit this API as one could easily evaluate this inside the context to get the value.

devsnek

comment created time in 8 days

Pull request review commentnodejs/node

vm: introduce vm.Context

 The `vm` module enables compiling and running code within V8 Virtual Machine contexts. **The `vm` module is not a security mechanism. Do not use it to run untrusted code**. -JavaScript code can be compiled and run immediately or-compiled, saved, and run later.+JavaScript code can be compiled and run immediately or compiled, saved, and run+later. -A common use case is to run the code in a different V8 Context. This means-invoked code has a different global object than the invoking code.--One can provide the context by [_contextifying_][contextified] an-object. The invoked code treats any property in the context like a-global variable. Any changes to global variables caused by the invoked-code are reflected in the context object.

It doesn’t seem proper to me to remove documentation regarding the currently stable API, and replace it with an experimental one, no matter how good the latter is.

devsnek

comment created time in 8 days

Pull request review commentnodejs/node

vm: introduce vm.Context

 MaybeLocal<Context> ContextifyContext::CreateV8Context(     Local<Object> sandbox_obj,     const ContextOptions& options) {   EscapableHandleScope scope(env->isolate());-  Local<FunctionTemplate> function_template =-      FunctionTemplate::New(env->isolate());--  function_template->SetClassName(sandbox_obj->GetConstructorName());--  Local<ObjectTemplate> object_template =-      function_template->InstanceTemplate(); -  Local<Object> data_wrapper;-  if (!CreateDataWrapper(env).ToLocal(&data_wrapper))-    return MaybeLocal<Context>();--  NamedPropertyHandlerConfiguration config(-      PropertyGetterCallback,-      PropertySetterCallback,-      PropertyDescriptorCallback,-      PropertyDeleterCallback,-      PropertyEnumeratorCallback,-      PropertyDefinerCallback,-      data_wrapper,-      PropertyHandlerFlags::kHasNoSideEffect);--  IndexedPropertyHandlerConfiguration indexed_config(-      IndexedPropertyGetterCallback,-      IndexedPropertySetterCallback,-      IndexedPropertyDescriptorCallback,-      IndexedPropertyDeleterCallback,-      PropertyEnumeratorCallback,-      IndexedPropertyDefinerCallback,-      data_wrapper,-      PropertyHandlerFlags::kHasNoSideEffect);--  object_template->SetHandler(config);-  object_template->SetHandler(indexed_config);+  Local<ObjectTemplate> object_template;

Why move this away from where it’s initialized?

devsnek

comment created time in 8 days

Pull request review commentnodejs/node

vm: introduce vm.Context

 void ContextifyContext::Init(Environment* env, Local<Object> target) { }  -// makeContext(sandbox, name, origin, strings, wasm);+// makeContext(sandbox, name, origin, strings, wasm, instance); void ContextifyContext::MakeContext(const FunctionCallbackInfo<Value>& args) {   Environment* env = Environment::GetCurrent(args); -  CHECK_EQ(args.Length(), 5);-  CHECK(args[0]->IsObject());-  Local<Object> sandbox = args[0].As<Object>();+  CHECK_EQ(args.Length(), 6); -  // Don't allow contextifying a sandbox multiple times.-  CHECK(-      !sandbox->HasPrivate(-          env->context(),-          env->contextify_context_private_symbol()).FromJust());+  Local<Object> sandbox;

Same here.

devsnek

comment created time in 8 days

delete branch EB-Forks/webidl2js

delete branch : fix/interface/remove-dead-code

delete time in 8 days

push eventjsdom/webidl2js

ExE Boss

commit sha 2ce65bd021524b39d186342ff1e3738f9b293076

Remove more old-style mixins code (#171) Fixed up b81320a09bf04639e32701b054a144dd2593ca31.

view details

push time in 8 days

PR merged jsdom/webidl2js

Reviewers
fix(interface): Remove dead code

This removes the last of the old‑style mixin dead code that was not removed in https://github.com/jsdom/webidl2js/pull/135.

+135 -1937

1 comment

3 changed files

ExE-Boss

pr closed time in 8 days

delete branch autotools-mirror/libtool

delete branch : praiskup-ARFLAGS

delete time in 8 days

delete branch autotools-mirror/automake

delete branch : minor

delete time in 8 days

delete branch autotools-mirror/automake

delete branch : micro

delete time in 8 days

delete branch autotools-mirror/automake

delete branch : gsoc-refactoring

delete time in 8 days

pull request commentjsdom/webidl2js

fix(interface): Remove dead code

Could you also update the README? It still has a few references to “mixin interfaces” or #55 that were things of the past.

ExE-Boss

comment created time in 8 days

issue closedjsdom/webidl2js

Don't export most things, for mixins

See also #53. is/isImpl and maybe mixedInto make sense. But most of the rest of the exports don't.

To reliably identify a mixin, we can either wait for https://github.com/heycam/webidl/issues/363 or we can use a custom extended attribute in the meantime.

closed time in 8 days

domenic

issue commentjsdom/webidl2js

Don't export most things, for mixins

Fixed in #135. Interface mixins don’t cause files to be generated.

domenic

comment created time in 8 days

Pull request review commentjsdom/webidl2js

fix(interface): Remove dead code

 class Interface {         this.stringifier = member;       }     }-    for (const member of this.inheritedMembers(seen)) {+    for (const member of this.inheritedMembers()) {

Aha, I missed that it had a default parameter. Looks good then.

ExE-Boss

comment created time in 8 days

push eventFFmpeg/FFmpeg

Paul B Mahol

commit sha 464310c16062efe234cb016ff41fa312546dfc5e

avcodec: add siren audio decoder

view details

Paul B Mahol

commit sha b4305d60f68ade2601dbf238ae5a88d74d388f98

avformat/vivo: improve probing of some files Signed-off-by: Paul B Mahol <onemda@gmail.com>

view details

Paul B Mahol

commit sha a07b19d9af6377beac5630cb49065ede426c4fee

avformat/vivo: set packet duration Signed-off-by: Paul B Mahol <onemda@gmail.com>

view details

push time in 8 days

push eventFFmpeg/FFmpeg

Nicolas George

commit sha fbb36d74ac6c491cdde552863981a593059e94b7

lavd/opengl_enc: use proper context for logging. Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].

view details

Nicolas George

commit sha 26ae9c9f8aebbf4b925649f971f90c0dee047aa9

lavd/opengl_enc: check strings before parsing them. Fix a segfault if OpenGL was not initialized before calling write_header().

view details

push time in 8 days

release jsdom/tr46

v2.0.2

released time in 8 days

release jsdom/tr46

v2.0.1

released time in 8 days

more