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
This reverts commit 3fe7170728.
Revert "Bug 2011767 - urlpattern crate version bump to fix CI bustage and some perf fixes r=necko-reviewers,supply-chain-reviewers,kershaw"
This reverts commit 34fe02635a.
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
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
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D256800