Files
Ed Guloien bb8fd8d7fb Bug 1984171 - Added spidermonkey regex into URLPattern by integrating with urlpattern crate r=necko-reviewers,valentin,iain,smaug
This patch integrates spidermonkey regex into urlpattern crate so the URLPattern
API uses EcmaScript regex instead of rust's regex.
The dom URLPattern holds onto an opaque pointer to the urlpattern::URLPattern<R>
from the crates lib.rs. Where we implement SpiderMonkeyRegexp for RegExp (R).
We use an ffi api to access SpiderMonkey parsing for pattern construction
and exec for matching. During parsing, SpiderMonkey produces a regexp object
that can be held by our SpiderMonkeyRegExp, which is kept alive ultimately by the dom's URLPattern.

It's a bit clunky because Spidermonkey works with UTF-16, while our WebAPI and rust works with UTF-8
but it seems to work.

Also I got rid of some unnecessary Urlp types and their associated funcions and tests by using more opaque pointers.

Differential Revision: https://phabricator.services.mozilla.com/D278548
2026-01-29 00:57:22 +00:00
..