Closed Bug 1984171 Opened 6 months ago Closed 1 month ago

Use spidermonkey regex in URLPattern

Categories

(Core :: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: edgul, Assigned: edgul)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged][necko-priority-queue])

Attachments

(1 file, 10 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review

There is at least one WPT failure that should be addressed by supplying the SpiderMonkey regex to the URLPattern crate:
Pattern: [{"pathname":"*{}**?"}] Inputs: [{"pathname":"foobar"}]

Let's fix this as a followup to the URLPattern interop 2025 project.

See Also: → 1974216
Assignee: nobody → edgul
Status: NEW → ASSIGNED

Quick status update for anyone following:

The above patch contains an almost working prototype where we provide a rust implementation of Spidermonkey Regex functionality to the urlpattern crate. We create C-API for the necessary SM calls and invoke from rust. Note that the current approach is one that creates the SM RegExp object on demand rather than handling any GC problems created by passing SM GC-controlled objects through rust. This has obvious performance issues that hopefully we can resolve after we get the POC working.

Note that the above patch depends on upstreaming a small amount of changes to the urlpattern crate. So far the necessary changes are shown here: https://github.com/denoland/rust-urlpattern/compare/main...edgul:rust-urlpattern:tmp

Flags: needinfo?(valentin.gosu)
See Also: → 1998871
Flags: needinfo?(valentin.gosu)

The interop aspect of this project is closing, moving this into queue to be handled as maintenance

Whiteboard: [necko-triaged] → [necko-triaged][necko-priority-queue]
Duplicate of this bug: 1974216
Blocks: urlpattern
Attachment #9536491 - Attachment is obsolete: true
Attachment #9536490 - Attachment is obsolete: true
Attachment #9536240 - Attachment is obsolete: true
Attachment #9536007 - Attachment is obsolete: true
Attachment #9536006 - Attachment is obsolete: true
Attachment #9536005 - Attachment is obsolete: true
Attachment #9520308 - Attachment is obsolete: true
Attachment #9537244 - Attachment description: WIP: Bug 1984171 - Vendor in urlpattern 0.5.0 crate r?#necko-reviewers → Bug 1984171 - Vendor in urlpattern 0.5.0 crate r?#necko-reviewers
Attachment #9536741 - Attachment description: WIP: Bug 1984171 - Added spidermonkey regex into URLPattern by integrating with urlpattern crate → Bug 1984171 - Added spidermonkey regex into URLPattern by integrating with urlpattern crate r?#necko-reviewers
Attachment #9522271 - Attachment is obsolete: true

This patch adds Trace functions so that when incremental GC happens we can Trace down to the spidermonkey regexp obj that is stored in the urlpattern::component. It's seems a bit complicated because of having to pass through the ffi boundary.

Pushed by eguloien@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/35fa66706d19 https://hg.mozilla.org/integration/autoland/rev/dc5e3332bf3d Vendor in urlpattern 0.5.0 crate r=necko-reviewers,supply-chain-reviewers,valentin https://github.com/mozilla-firefox/firefox/commit/ed54d1409d54 https://hg.mozilla.org/integration/autoland/rev/937cfcb68de4 Added spidermonkey regex into URLPattern by integrating with urlpattern crate r=necko-reviewers,valentin,iain,smaug

Comment on attachment 9538010 [details]
Bug 1984171 - Add URLPattern GC incremental slicing for spidermonkey regexp obj r?iain,smaug

Revision D279222 was moved to bug 2011529. Setting attachment 9538010 [details] to obsolete.

Attachment #9538010 - Attachment is obsolete: true
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d5adac594cec https://hg.mozilla.org/integration/autoland/rev/24c00baf33d0 Revert "Bug 1984171 - Added spidermonkey regex into URLPattern by integrating with urlpattern crate r=necko-reviewers,valentin,iain,smaug" for causing build bustages

Backed out for causing build bustages

Backout link

Push with failures

Failure log

Flags: needinfo?(edgul)
Attachment #9537244 - Attachment is obsolete: true
Pushed by eguloien@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3fe7170728cb https://hg.mozilla.org/integration/autoland/rev/52ecd38c69f1 Added spidermonkey regex into URLPattern by integrating with urlpattern crate r=necko-reviewers,valentin,iain,smaug
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a47d3d742256 https://hg.mozilla.org/integration/autoland/rev/d8594f11efad Revert "Bug 1984171, Bug 2011767 - Added spidermonkey regex into URLPattern by integrating with urlpattern crate r=necko-reviewers,valentin,iain,smaug" for causing failures complaining about regexResult.
Pushed by eguloien@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bb8fd8d7fbbc https://hg.mozilla.org/integration/autoland/rev/d676f790d29c Added spidermonkey regex into URLPattern by integrating with urlpattern crate r=necko-reviewers,valentin,iain,smaug
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Flags: needinfo?(edgul)
See Also: 1974216
Blocks: 1998871
See Also: 1998871
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: