| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Feature] Share one call context across module interceptor hooks Extend the existing interception hooks with argument preparation, result rewriting and paired cleanup. One interceptor supplies a context for each invocation, shared with its callbacks. Preserve the handling interceptor as the result and callback propagation boundary, including inline callbacks and reentrant calls. Reject multiple context providers and keep borrowed arguments out of the context. Keep legacy chains on the existing hooks without allocating call contexts or dispatching new hooks. Invocation hooks require explicit registration; leading interceptors enable them automatically. Discard empty groups after installation. Retain per-call propagation boundaries for stateless chains that opt in. Record replaced results consistently, including undefined. Extract interceptor registration and invocation cleanup into dedicated files. Extend CallJSCallback with optional forced asynchronous dispatch and reuse its callback-release argument. Keep native invocation scopes balanced on handled and native paths. Reduce generated code by directly initializing native results and transferring context and argument ownership without move-assignment machinery. TEST: 36 focused QuickJS module/interceptor/manager tests pass. Modified Android arm64 optimized objects compile. Interleaved host JSB benchmarks cover empty and request-interceptor chains with and without callbacks: legacy allocation counts match the pre-change baseline at 4 and 13 C++ allocations per call. | 2 天前 | |
[Feature] Add per-file gate to skip redundant bytecode generation - What changed: Add an optional "continueGeneration(jsName, md5)" gate to the bytecode generation path. When a LynxBytecodeCallback (Android) or LynxBytecodeContinueBlock (iOS) is supplied, JsCacheManager consults it once per decoded js file right before generating that file's bytecode. Returning false skips the file so it is neither generated nor returned; returning true keeps the previous behavior. A run where every file is skipped is reported as success instead of a generation failure. - Why it was needed: postJsCacheGenerationTask decodes a compiled template.js into many internal js files and, in callback mode, hands all generation to the external owner. When only template.js changes but its inner js files do not, the owner previously had no way to avoid regenerating bytecode it already holds. The md5 of each file's source content is a stable, content-addressed dedup key that native already computes, so the gate lets the owner skip by md5. - How it was verified / impacts: Backward compatible. On Android the new interface method is a default method returning true, so existing callbacks compile and behave unchanged. On iOS the gate is a new optional block and a new postJsCacheGenerationTask:callback:continueGeneration: overload; the existing callback overload forwards with a nil gate. Core, facade, and both platform entry points thread the optional gate through; a null gate always generates. AutoSubmit: True | 9 天前 | |
[Feature][iOS] Load templates and bytecode through resource handles Load handle-backed template fetch results through synchronous bundle creation. Centralize conversion and error handling, preserve View-scoped verification for View loads, and use bundle-scoped verification for preloading. Reject handles for lazy bundles. Normalize external resource results to shared immutable data and connect optional handle bytecode fetching to BTS consumers. Limit callback deduplication to the handle path and retain the existing byte fetcher fallback. Share native handle access through an internal header and synchronize ownership acquisition and invalidation. Change-Id: I6ba36510ec4fb81999b88c6c03982ca8202569d5 | 1 天前 | |
[Optimize][JSRuntime] Switch runtime ownership to UnsafeOwningPtr and UnsafeWeakPtr across JS/NAPI paths Replace `std::shared_ptr`/`std::weak_ptr` usage for JS runtimes with `base::UnsafeOwningPtr` and `base::UnsafeWeakPtr` to make runtime ownership explicit and avoid accidental ref-count extension. Update NAPI runtime proxy creation to take `Runtime&` and store only a weak runtime handle, and adjust loader hooks to use `Lock()` instead of `lock()`. Refactor Global/App/JSExecutor/RuntimeManager to pass weak runtime handles through factories and callbacks, and migrate devtool and unit tests to the new pointer types and APIs. AutoSubmit: True issue: m-7282878213 | 5 个月前 | |
[Doc] Add AGENTS guides for runtime and renderer bridges - Add AGENTS guides for runtime bridge layers across JS, JSI, LepusNG, profiling, VDOM, Starlight, and TASM React. - Document how these bridging directories hand work between execution engines, renderer trees, and wrapper boundaries. - Verified by keeping this commit within the 300-line limit during the history rewrite. AutoSubmit:True | 6 个月前 | |
[Feature] Share one call context across module interceptor hooks Extend the existing interception hooks with argument preparation, result rewriting and paired cleanup. One interceptor supplies a context for each invocation, shared with its callbacks. Preserve the handling interceptor as the result and callback propagation boundary, including inline callbacks and reentrant calls. Reject multiple context providers and keep borrowed arguments out of the context. Keep legacy chains on the existing hooks without allocating call contexts or dispatching new hooks. Invocation hooks require explicit registration; leading interceptors enable them automatically. Discard empty groups after installation. Retain per-call propagation boundaries for stateless chains that opt in. Record replaced results consistently, including undefined. Extract interceptor registration and invocation cleanup into dedicated files. Extend CallJSCallback with optional forced asynchronous dispatch and reuse its callback-release argument. Keep native invocation scopes balanced on handled and native paths. Reduce generated code by directly initializing native results and transferring context and argument ownership without move-assignment machinery. TEST: 36 focused QuickJS module/interceptor/manager tests pass. Modified Android arm64 optimized objects compile. Interleaved host JSB benchmarks cover empty and request-interceptor chains with and without callbacks: legacy allocation counts match the pre-change baseline at 4 and 13 C++ allocations per call. | 2 天前 | |
[Feature] Support LynxML background scripts - Wrap background-thread source in the return-by-function app-service format. - Store the wrapped source in the JS bundle used by the card loading path. - Declare the template bundle's direct dependency on JS common code. issue: f-7350207575 AutoSubmit: true | 1 个月前 | |
[Feature] Support LynxML background scripts - Wrap background-thread source in the return-by-function app-service format. - Store the wrapped source in the JS bundle used by the card loading path. - Declare the template bundle's direct dependency on JS common code. issue: f-7350207575 AutoSubmit: true | 1 个月前 | |
[BugFix] Reuse registered lazy bundles for BTS loads - Store pre-registered template bundles in the JS bundle holder so BTS can detect cached bundles before external loading. - Route cached template bundles through BTSRuntimeMediator to the engine while missing bundles continue through the external resource loader. - Preserve the template entry lifecycle before executable JS bundle content is used by BTS. TEST: ./out/Default/shell_unittests_exec (80 tests). AutoSubmit: true | 3 个月前 | |
[Refactor][Runtime] Rename piper namespace to runtime::js across codebase Detailed description: Rename all piper namespace references to runtime::js throughout the project Batch modification of 584 files including headers, source files, and test files Update related include paths and namespace declarations Maintain original functionality with only naming standardization changes This refactoring primarily aims to unify code naming conventions by consolidating the original piper namespace under runtime::js, making the code structure clearer and more consistent. AutoSubmit: True doc: https://github.com/lynx-family/lynx/discussions/281 issue: m-6787224557 | 8 个月前 | |
[Feature][Android] Add V8 JS stack capture and execution termination APIs Add two LynxView main-thread APIs so integrators can diagnose a stuck JS thread when V8 is the engine: - captureJavaScriptStack(callback): capture the current JS call stack. - terminateJavaScriptExecution(): abort the currently running JS. AutoSubmit: True | 30 天前 | |
[Feature][Android] Add V8 JS stack capture and execution termination APIs Add two LynxView main-thread APIs so integrators can diagnose a stuck JS thread when V8 is the engine: - captureJavaScriptStack(callback): capture the current JS call stack. - terminateJavaScriptExecution(): abort the currently running JS. AutoSubmit: True | 30 天前 | |
[Feature][Android] Add V8 JS stack capture and execution termination APIs Add two LynxView main-thread APIs so integrators can diagnose a stuck JS thread when V8 is the engine: - captureJavaScriptStack(callback): capture the current JS call stack. - terminateJavaScriptExecution(): abort the currently running JS. AutoSubmit: True | 30 天前 | |
[Feature][Recorder] Support fixture replay (Part 1: shared C++ integration) Extract the shared C++ integration from the Fixture replay implementation. Dispatch native module calls through the persistent context, retain callback payloads, and invalidate callbacks before releasing the runtime and assets. Platforms opt in through the replay data module while JSON replay keeps its existing entry path. Reject embedded NUL at Fixture JSON boundaries to prevent silent truncation. Use a private reference-counted Fixture VM for execution limits, and initialize worker task runners for memory tracking. Adapt the worker regression to the current memory-monitor test API and verify the replay data module contract without a platform implementation. Reuse module insertion templates and stream validated argument values into the JSON writer without retaining a second DOM for the entire argument array. Distinguish disabled, ready and failed Fixture initialization. Preserve JSON replay for missing interfaces or empty directories; report initialization failures and close the replay manager without falling back to JSON. Verify mode selection, failure reporting and single asset release across retries. Extracted from commit d74dbbf39ff0b86bed375b7d475509354731cf3c. TEST: Replay 65/65 and Recorder 74/74 passed. TEST: JSExecutor syntax check with replay enabled; clang-format checks passed. TEST: Replay initialization regression covers six modes; Replay 65/65 passed. TEST: coding-style, spell, cpplint, cpp-header-path and copyright passed. SkipChecks: macro | 8 天前 | |
[Testing] Test explicit JS realm lifetimes - Cover retained contexts, independent sharing modes, and repeated executor destruction. AutoSubmit: True | 11 天前 | |
[Refactor] Merge global runtime binding objects - Fold the weak runtime observer from SingleGlobal into Global. - Update JS realms to own the unified Global implementation. - Add unit coverage for host object setup and runtime lifetime behavior. AutoSubmit: True | 11 天前 | |
[Refactor] Merge global runtime binding objects - Fold the weak runtime observer from SingleGlobal into Global. - Update JS realms to own the unified Global implementation. - Add unit coverage for host object setup and runtime lifetime behavior. AutoSubmit: True | 11 天前 | |
[BugFix][DevTool] Fix inspector cleanup for reused shared contexts A shared context could be created while JS debugging was disabled and later reused after debugging was enabled. The reuse path initialized its inspector without registering the group in group_to_engine_type_. When that reused context was released, OnRelease could not select the corresponding release callback, leaving stale context and inspector entries in QJSInspectorClientImpl. Recreating the same group could then access state associated with the destroyed QuickJS context. DisconnectSession also retained a reference to the channel-owned group ID after erasing that channel, resulting in a dangling reference. - Call EnsureSharedContextRegistered before OnRuntimeReady when reusing a shared context. - Remove the group registration from group_to_engine_type_ when releasing the shared context. - Copy the group ID before DisconnectSession erases the channel that owns it. - Log requested and registered engine types in EnsureSharedContextRegistered. TEST: js_debug_unittest_exec | 9 天前 | |
[BugFix][DevTool] Fix inspector cleanup for reused shared contexts A shared context could be created while JS debugging was disabled and later reused after debugging was enabled. The reuse path initialized its inspector without registering the group in group_to_engine_type_. When that reused context was released, OnRelease could not select the corresponding release callback, leaving stale context and inspector entries in QJSInspectorClientImpl. Recreating the same group could then access state associated with the destroyed QuickJS context. DisconnectSession also retained a reference to the channel-owned group ID after erasing that channel, resulting in a dangling reference. - Call EnsureSharedContextRegistered before OnRuntimeReady when reusing a shared context. - Remove the group registration from group_to_engine_type_ when releasing the shared context. - Copy the group ID before DisconnectSession erases the channel that owns it. - Log requested and registered engine types in EnsureSharedContextRegistered. TEST: js_debug_unittest_exec | 9 天前 | |
[Testing] Test explicit JS realm lifetimes - Cover retained contexts, independent sharing modes, and repeated executor destruction. AutoSubmit: True | 11 天前 | |
[Refactor][Runtime] Consolidate JS runtime utilities into js namespace Move JS-related runtime utilities from core/runtime/common into core/runtime/js and update all includes, namespaces, and call sites to use the new layout. Key updates: - Rename and relocate utils, args_converter, and jsi_object_wrapper into core/runtime/js, and drop Android-only helpers from the common layer. - Switch JSErrorReporter and console constants to the lynx::runtime namespace and fix all references (including devtool mappings). - Replace the removed utils_map JNI glue with generic byte-array helpers in Android JNIHelper for JavaOnlyArray/JavaOnlyMap interop. - Update BUILD.gn, JNI configs, and unit tests to reflect the new directory structure and header paths. AutoSubmit: True doc: https://github.com/lynx-family/lynx/discussions/281 issue: m-6787224557 | 8 个月前 | |
[Refactor][Runtime] Consolidate JS runtime utilities into js namespace Move JS-related runtime utilities from core/runtime/common into core/runtime/js and update all includes, namespaces, and call sites to use the new layout. Key updates: - Rename and relocate utils, args_converter, and jsi_object_wrapper into core/runtime/js, and drop Android-only helpers from the common layer. - Switch JSErrorReporter and console constants to the lynx::runtime namespace and fix all references (including devtool mappings). - Replace the removed utils_map JNI glue with generic byte-array helpers in Android JNIHelper for JavaOnlyArray/JavaOnlyMap interop. - Update BUILD.gn, JNI configs, and unit tests to reflect the new directory structure and header paths. AutoSubmit: True doc: https://github.com/lynx-family/lynx/discussions/281 issue: m-6787224557 | 8 个月前 | |
[Refactor][Runtime] Rename piper namespace to runtime::js across codebase Detailed description: Rename all piper namespace references to runtime::js throughout the project Batch modification of 584 files including headers, source files, and test files Update related include paths and namespace declarations Maintain original functionality with only naming standardization changes This refactoring primarily aims to unify code naming conventions by consolidating the original piper namespace under runtime::js, making the code structure clearer and more consistent. AutoSubmit: True doc: https://github.com/lynx-family/lynx/discussions/281 issue: m-6787224557 | 8 个月前 | |
[Refactor][Runtime] Rename piper namespace to runtime::js across codebase Detailed description: Rename all piper namespace references to runtime::js throughout the project Batch modification of 584 files including headers, source files, and test files Update related include paths and namespace declarations Maintain original functionality with only naming standardization changes This refactoring primarily aims to unify code naming conventions by consolidating the original piper namespace under runtime::js, making the code structure clearer and more consistent. AutoSubmit: True doc: https://github.com/lynx-family/lynx/discussions/281 issue: m-6787224557 | 8 个月前 | |
[Refactor][Runtime] Rename piper namespace to runtime::js across codebase Detailed description: Rename all piper namespace references to runtime::js throughout the project Batch modification of 584 files including headers, source files, and test files Update related include paths and namespace declarations Maintain original functionality with only naming standardization changes This refactoring primarily aims to unify code naming conventions by consolidating the original piper namespace under runtime::js, making the code structure clearer and more consistent. AutoSubmit: True doc: https://github.com/lynx-family/lynx/discussions/281 issue: m-6787224557 | 8 个月前 | |
[BugFix] Reuse registered lazy bundles for BTS loads - Store pre-registered template bundles in the JS bundle holder so BTS can detect cached bundles before external loading. - Route cached template bundles through BTSRuntimeMediator to the engine while missing bundles continue through the external resource loader. - Preserve the template entry lifecycle before executable JS bundle content is used by BTS. TEST: ./out/Default/shell_unittests_exec (80 tests). AutoSubmit: true | 3 个月前 | |
[BugFix] Do not cache whole module in `BaseApp._$factoryCache` Caching the JS module in group level static cache leads to delayed memory deallocation. Furthermore, within the identified code path, the `APP_SERVICE_NAME` cache module offers no reuse value. AutoLand: release/4.4 | 4 天前 | |
[Infra] Batch synchronize code from the upstream branch. | 9 个月前 | |
[Feature] Expose JS runtime type in runtime attach lifecycle - Pass the JS runtime type string when the NAPI environment is attached to runtime lifecycle observers. - Reuse the shared JSRuntimeTypeToString helper for both SystemInfo and lifecycle attach metadata. - Update Android, iOS, Harmony, embedder, canvas mediator, examples, tests, and API snapshots for the expanded attach callback. issue: m-7360103689 AutoSubmit: True AutoLand: release/4.1, release/4.0 | 2 个月前 | |
[Feature] Expose JS runtime type in runtime attach lifecycle - Pass the JS runtime type string when the NAPI environment is attached to runtime lifecycle observers. - Reuse the shared JSRuntimeTypeToString helper for both SystemInfo and lifecycle attach metadata. - Update Android, iOS, Harmony, embedder, canvas mediator, examples, tests, and API snapshots for the expanded attach callback. issue: m-7360103689 AutoSubmit: True AutoLand: release/4.1, release/4.0 | 2 个月前 | |
[Feature] Expose JS runtime type in runtime attach lifecycle - Pass the JS runtime type string when the NAPI environment is attached to runtime lifecycle observers. - Reuse the shared JSRuntimeTypeToString helper for both SystemInfo and lifecycle attach metadata. - Update Android, iOS, Harmony, embedder, canvas mediator, examples, tests, and API snapshots for the expanded attach callback. issue: m-7360103689 AutoSubmit: True AutoLand: release/4.1, release/4.0 | 2 个月前 | |
[Feature][Logging] Observe actions through recording macros Centralize observation logs in RECORD and pass LogContext after the action at every entry point. Keep the original arguments and record ID for the optional Recorder, evaluating shared arguments only once. Propagate runtime context to scripts and native module callbacks. Observation remains available without Recorder and follows the existing OBSERVE threshold. Log action metadata without serializing or writing payloads. Cover lazy arguments, optional conditions and enclosing-function returns. TEST: Recorder-enabled and recorder-disabled syntax checks pass for core and desktop call sites and macro tests. All 75 record_unittest_exec tests pass. AutoSubmit: True SkipChecks: macro | 1 个月前 | |
[Infra] Batch synchronize code from the upstream branch. | 9 个月前 | |
[Optimize][Runtime] Report circular JS data with its property path Circular reference detection only tagged the conversion site and logged the offending key via LOGE, so the final error report never carried the key that actually closed the cycle, forcing a log dive to diagnose. - Add js::CircularDataChecker to track ancestor objects together with the property key / array index used to reach each of them, and build the full path (e.g. .user.friends[1].parent) plus the ancestor it points back to when a cycle is found. - Emit one message shared by reportJSIException and LOGE so the reported exception and the log can no longer drift apart, and quote keys that contain path separators to keep the rendered path unambiguous. - Thread the checker through ParseJSValue and ConvertPiper*ToPubValue and update all call sites in js_app, lynx_jsi_module, and module_testbench. - Align the pub-value ValueImplPiper::CheckCircle wording with the same "Find circular JS data" prefix so both paths are searchable together. AutoSubmit: True | 1 个月前 | |
[Optimize][Runtime] Report circular JS data with its property path Circular reference detection only tagged the conversion site and logged the offending key via LOGE, so the final error report never carried the key that actually closed the cycle, forcing a log dive to diagnose. - Add js::CircularDataChecker to track ancestor objects together with the property key / array index used to reach each of them, and build the full path (e.g. .user.friends[1].parent) plus the ancestor it points back to when a cycle is found. - Emit one message shared by reportJSIException and LOGE so the reported exception and the log can no longer drift apart, and quote keys that contain path separators to keep the rendered path unambiguous. - Thread the checker through ParseJSValue and ConvertPiper*ToPubValue and update all call sites in js_app, lynx_jsi_module, and module_testbench. - Align the pub-value ValueImplPiper::CheckCircle wording with the same "Find circular JS data" prefix so both paths are searchable together. AutoSubmit: True | 1 个月前 | |
[Optimize][Runtime] Report circular JS data with its property path Circular reference detection only tagged the conversion site and logged the offending key via LOGE, so the final error report never carried the key that actually closed the cycle, forcing a log dive to diagnose. - Add js::CircularDataChecker to track ancestor objects together with the property key / array index used to reach each of them, and build the full path (e.g. .user.friends[1].parent) plus the ancestor it points back to when a cycle is found. - Emit one message shared by reportJSIException and LOGE so the reported exception and the log can no longer drift apart, and quote keys that contain path separators to keep the rendered path unambiguous. - Thread the checker through ParseJSValue and ConvertPiper*ToPubValue and update all call sites in js_app, lynx_jsi_module, and module_testbench. - Align the pub-value ValueImplPiper::CheckCircle wording with the same "Find circular JS data" prefix so both paths are searchable together. AutoSubmit: True | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 天前 | ||
| 9 天前 | ||
| 1 天前 | ||
| 5 个月前 | ||
| 6 个月前 | ||
| 2 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 8 个月前 | ||
| 30 天前 | ||
| 30 天前 | ||
| 30 天前 | ||
| 8 天前 | ||
| 11 天前 | ||
| 11 天前 | ||
| 11 天前 | ||
| 9 天前 | ||
| 9 天前 | ||
| 11 天前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 3 个月前 | ||
| 4 天前 | ||
| 9 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 9 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |