summaryrefslogtreecommitdiff
path: root/core/00_primordials.js
AgeCommit message (Collapse)Author
2023-06-26Revert "Reland "refactor(core): cleanup feature flags for js source i… ↵Bartek Iwańczuk
(#19611) …nclusion" (#19519)" This reverts commit 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2. This change causes failures when used outside Deno repo: ``` ============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: linux x86_64 Version: 1.34.3+b37b286 Args: ["/opt/hostedtoolcache/deno/0.0.0-b37b286f7fa68d5656f7c180f6127bdc38cf2cf5/x64/deno", "test", "--doc", "--unstable", "--allow-all", "--coverage=./cov"] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to read "/home/runner/work/deno/deno/core/00_primordials.js" Caused by: No such file or directory (os error 2)', core/runtime/jsruntime.rs:699:8 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
2023-06-25Reland "refactor(core): cleanup feature flags for js source inclusion" (#19519)Nayeem Rahman
Relands #19463. This time the `ExtensionFileSourceCode` enum is preserved, so this effectively just splits feature `include_js_for_snapshotting` into `exclude_js_sources` and `runtime_js_sources`, adds a `force_include_js_sources` option on `extension!()`, and unifies `ext::Init_ops_and_esm()` and `ext::init_ops()` into `ext::init()`.
2023-06-13Revert "refactor(core): cleanup feature flags for js source inclusion… ↵Bartek Iwańczuk
(#19490) … (#19463)" This reverts commit ceb03cfb037cf7024a5048b17b508ddda59cfa05. This is being reverted because it causes 3.5Mb increase in the binary size, due to runtime JS code being included in the binary, even though it's already snapshotted. CC @nayeemrmn
2023-06-13refactor(core): cleanup feature flags for js source inclusion (#19463)Nayeem Rahman
Remove `ExtensionFileSourceCode::LoadedFromFsDuringSnapshot` and feature `include_js_for_snapshotting` since they leak paths that are only applicable in this repo to embedders. Replace with feature `exclude_js_sources`. Additionally the feature `force_include_js_sources` allows negating it, if both features are set. We need both of these because features are additive and there must be a way of force including sources for snapshot creation while still having the `exclude_js_sources` feature. `force_include_js_sources` is only set for build deps, so sources are still excluded from the final binary. You can also specify `force_include_js_sources` on any extension to override the above features for that extension. Towards #19398. But there was still the snapshot-from-snapshot situation where code could be executed twice, I addressed that by making `mod_evaluate()` and scripts like `core/01_core.js` behave idempotently. This allowed unifying `ext::init_ops()` and `ext::init_ops_and_esm()` into `ext::init()`.
2023-04-26fix(core): Wrap safe collections' argument of primordials (#18750)Kenta Moriuchi
2023-03-13fix(core): `SafePromiseAll` to be unaffected by `Array#@@iterator` (#17542)Kenta Moriuchi
2023-03-01fix(core): introduce `SafeRegExp` to primordials (#17592)Kenta Moriuchi
2023-01-26fix(core): Add lint check for core (#17223)Kenta Moriuchi
The prefer-primordials lint was skipped for `core/*.js`.
2023-01-19refactor(core): Overwrite `ArrayPrototypeToString` in primordials (#17470)Kenta Moriuchi
2023-01-15fix(core): Add `Generator` and `AsyncGenerator` to promordials (#17241)Kenta Moriuchi
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-20chore: Update dlint (#17031)Kenta Moriuchi
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
2022-10-29fix(core): fix APIs not to be affected by `Promise.prototype.then` ↵Kenta Moriuchi
modification (#16326)
2022-09-02fix(ext/timers): create primordial `eval` (#15110)Garcia
2022-06-07refactor(core): Move Deno.core bindings to ops (#14793)Nayeem Rahman
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-09-02feat(fmt): add basic JS doc formatting (#11902)David Sherret
2021-08-17chore: add `FinalizationRegistry` and `WeakRef` to primordials (#11735)Antoine du Hamel
Because it was possible to disable those with a runtime flag, they were not available through primordials. The flag has since been removed upstream. Refs: https://github.com/v8/v8/commit/d59db06bf5425ddb388fb5a576f4bf39bdcc0f8f
2021-07-05refactor: introduce primordials for web/streams (#11251)Luca Casonato
2021-07-02refactor: use primordials for extensions/webidl (#11227)Luca Casonato
2021-07-02refactor: introduce primordials (#10939)Luca Casonato
This commit introduces primordials to deno_core. Primordials are a frozen set of all intrinsic objects in the runtime. They are not vulnerable to prototype pollution.