Closed Bug 1948035 Opened 13 days ago Closed 8 days ago

Consider throttle the navigation rather raising exceptions when the pushState limit is hit

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: sefeng, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

We failed to load https://bugzilla.mozilla.org/show_bug.cgi?id=1947479#c0 due this https://searchfox.org/mozilla-central/rev/e8da1e780e9b8ed2fd82a3b8d79c5f93e72697d3/docshell/base/BrowsingContext.cpp#3874,3898-3900 exception is raised.

Looks like what Chrome does is they don't raise the exception, but rather they throttle the navigation. I see a message Throttling navigation to prevent the browser from hanging. See https://crbug.com/1038223. Command line switch --disable-ipc-flooding-protection can be used to bypass the protection in Chrome's developer console when loading the same site.

Should we consider to do the same as Chrome?

Emma, what do you think?

Flags: needinfo?(emz)

Throttling would be really nice!

Would it be worthwhile to have a general IPC flooding protection? There are many APIs which can be used to IPC flood the parent, including document.cookie IIRC. I'm unsure how feasible this is. The last time I talked about this with IPC folks (5 years ago) they didn't like the idea very much.

See Bug 1588509.
Also see DoS section here: https://eviltrap.site/

Flags: needinfo?(emz)
See Also: → 1588509

What does throttling mean here? Silently ignoring pushState calls seems rather problematic (also, see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/history.cc;drc=5f14562c01775211a40ebc3056d0a773c3569008;l=336).

Severity: -- → S3

dom.navigation.navigationRateLimit.timespan is also very very long. 10 seconds is a lot.

sefeng, could you try some shorter timespan for now? Tweaking the pref value would be a simple tweak.

Flags: needinfo?(sefeng)
Flags: needinfo?(sefeng)

Given Chrome isn't doing anything special, I am closing this bug. So that we can keep the conversation in bug 1947479.

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → INVALID

What you mean Chrome isn't doing anything special? Aren't they dropping pushState calls if there are "too many"?

I mean they aren't really doing anything different than us. They use the same rate, it's just they don't throw the exception. Initially I filed this bug because I thought they had some special "throttling" mechanism to not dropping those calls, but apparently that wasn't the case.

You need to log in before you can comment on or make changes to this bug.