Commit Graph
12 Commits
Author SHA1 Message Date
Claudio DeSouza d3a7f9ea83 [cr140] Migrate SpeedreaderJSHandler to gin::Wrappable
This class was still using the deprecated version that is set to be
deleted. This change migrates this class to use Oilpan GC for memory
management.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/61e491610dac67129273aa96549603483c59759f

commit 61e491610dac67129273aa96549603483c59759f
Author: Andreas Haas <ahaas@chromium.org>
Date:   Wed Jul 30 03:35:32 2025 -0700

    [gin] Delete DeprecatedWrappable

    This CL deletes gin::DeprecatedWrappable, and classes and data
    structures related to gin::DeprecatedWrappable. Additionally it removes
    internal fields of JS wrapper objects that were only used by
    gin::DeprecatedWrappable, but are not needed anymore with the new
    gin::Wrappable.

    Bug: 345640553
    Change-Id: Ideb4424048e62fec6c6a7ee5fd60a4635f6ef1e8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6799157
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Camille Lamy <clamy@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1494071}
2025-08-19 19:54:32 +01:00
Claudio DeSouza b4dd3a37f7 [cr140] gin::Wrappable deprecated
This class is now called `gin::DeprecatedWrappable`. There seems to be
some work to introduce a new class, but for now it is reverted.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3c15226886207c98dffc33a20b6a3dfd7df7a21c

commit 3c15226886207c98dffc33a20b6a3dfd7df7a21c
Author: Andreas Haas <ahaas@chromium.org>
Date:   Wed Jul 2 05:57:48 2025 -0700

    [gin] Rename gin::Wrappable to gin::DeprecatedWrappable

    This is the first CL of a sequence of CLs to refactor gin::Wrappable
    such that it is based on cppgc. In a follow-up CL we will re-introduce
    `gin::Wrappable` again, and then port all uses from
    `gin::DeprecatedWrappable` to `gin::Wrappable`.

    BYPASS_LARGE_CHANGE_WARNING

    Bug: 345640553
    Change-Id: Iad028a1cec93aa8ade3b35c8099f8de5081f88fe
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6513641
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Owners-Override: Rick Byers <rbyers@chromium.org>
    Reviewed-by: Rick Byers <rbyers@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1481539}

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f99163fe2d3428680834db3f141a6d83590561f0

commit f99163fe2d3428680834db3f141a6d83590561f0
Author: Nina Satragno <nsatragno@chromium.org>
Date:   Wed Jul 2 08:36:22 2025 -0700

    Revert "[gin] Introduce gin::Wrappable based on cppgc"

    This reverts commit dfbe3b4a57ddbfbfc74ab261b51db2ed87f754c2.

    Reason for revert: WrappableTest.WrapAndUnwrap failing on Linux
    UBSan tests

    https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20UBSan%20Tests/7971/overview

    Bug: 345640553
    Original change's description:
    > [gin] Introduce gin::Wrappable based on cppgc
    >
    > This CL implements the new `gin::Wrappable` based on cppgc, and ports
    > the tests in `wrappable_unittest` from `gin::DeprecatedWrappable` to
    > `gin::Wrappable`.
    >
    > The new implementation of `gin::Wrappable` has sightly different
    > semantics than the old one. In the old one it was possible to call
    > `Converter<WrappableSubClass>::FromV8()` with any JSObject, and the
    > JSObject would either get unwrapped if it wrapped an object of type
    > `WrappableSubClass`, or it would return nullptr. The new implementation
    > would either return nullptr or crash in a DCHECK if the JSObject wrapped
    > an object which is not of type `WrappableSubClass`.
    >
    > Bug: 345640553
    > Change-Id: Ia32e2d82f0383afb56382e9fe78fd94677b00fe8
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6519611
    > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    > Commit-Queue: Andreas Haas <ahaas@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1481565}

    Bug: 345640553
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Change-Id: I6499b57f278ce600d03e2d3bbeaee1df04ba3512
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6701047
    Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Auto-Submit: Nina Satragno <nsatragno@chromium.org>
    Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Owners-Override: Nina Satragno <nsatragno@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1481635}
2025-08-19 19:54:18 +01:00
cdesouza-chromium 3998467be9 [IWYU] Fixing logging inclusions //components (#29511)
This change is one of many fixing inclusion for the following files:

    - `base/notimplemented.h`
    - `base/notreached.h`
    - `base/check.h`
    - `base/dcheck_is_on.h`
    - `base/check_deref.h`
    - `base/check_op.h`
    - `base/logging/log_severity.h`
    - `base/logging.h`

This change is a mechanical change done with the following script:
https://github.com/brave/brave-browser/issues/46707#issuecomment-2960116515

Resolves https://github.com/brave/brave-browser/issues/46707
2025-06-11 16:03:11 +01:00
Claudio DeSouza 37f4c4cdb7 Avoid blink::MainThreadIsolate
This method is being removed in upstream, and all its use currently in
the codebase can be replaced by retrieving the isolate from the
available render frame instance.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/82551be317167b59bfe7360eb894d76262ad9e68

commit 82551be317167b59bfe7360eb894d76262ad9e68
Author: Dave Tapuska <dtapuska@chromium.org>
Date:   Wed Jan 31 21:49:53 2024 +0000

    Remove blink::MainThreadIsolate

    For the MBI project we need to be able to handle multiple isolates
    on the main thread. Most code was rewritten to handle this. The last
    usage is TaskEnvironment, and we can look at the MainThreadScheduler
    in that case because it is progressively being rewritten to use the
    variant that creates a new isolate each TaskEnvironment.

    Bug: 263412
2024-03-08 09:17:47 -03:00
Pavel Beloborodov f96ab479ca Original document security settings apply to speedreader document (#21958)
* Original HTML meta tags preserved in speedreader mode.
2024-02-14 18:42:13 +07:00
Claudio DeSouza 96ed9c86d8 [v8] Pending/Scheduled exception unified
This means there's only `has_exception()` now, which has been crrected
where it was being used.

Chromium change:
https://chromium.googlesource.com/v8/v8/+/a34be67351534cdff8ec04847630615eac9c057d

commit a34be67351534cdff8ec04847630615eac9c057d
Author: Toon Verwaest <verwaest@chromium.org>
Date:   Fri Dec 1 19:24:44 2023 +0100

    [exceptions] cleanup after unifying pending/scheduled exceptions
2024-01-15 14:27:02 -05:00
boocmp 8200c6b48e Inline Play/Pause button has been added.
Voice filter has been added, only voices which support the preferred languages (browser prefs) are listed in the voice control.
2023-09-15 19:59:29 +07:00
Pavel Beloborodov a1a0b1aefd Replaced speedreader isolated world id to ISOLATED_WORLD_ID_BRAVE_INTERNAL. (#17268) 2023-02-20 15:03:19 +07:00
Pavel Beloborodov 5bc26e0b99 Added nullptr check for render_frame(). (#15685)
* Added nullptr check for render_frame().
* More accurate way to use RenderFrame in SpeedreaderJsHandler.
2022-10-27 22:05:58 +07:00
Pavel Beloborodov 70e86b5ffc Do not share SpeedreaderJsHandler betweeen gin handles. (#14642) 2022-08-17 18:03:01 +07:00
Pavel Beloborodov ffff7ab30b Check is url looks readable in renderer. (#14066) 2022-07-13 12:14:17 +07:00
Pavel Beloborodov 65d802b6ef Added 'Show original page' link into distilled site. (#13814)
* Added 'Show original page' in speedreader distilled page.
* Exec js only on distilled pages.
2022-06-30 16:17:42 +07:00