Check for large ArrayBuffers or views in WebIDL bindings
Categories
(Core :: DOM: Bindings (WebIDL), task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
Assignee | ||
Comment 1•4 years ago
|
||
The pref is only checked on startup and sets a process-wide flag, so that we
don't have to worry about the value changing from under us.
Assignee | ||
Comment 2•4 years ago
|
||
The dom::TypedArray type currently represents its length as uint32_t. Changing
that to size_t/uint64_t would cause problems (truncation) for many 'Length()' callers.
Instead of requiring a length check for each of those call sites, for now check for
and reject large array buffers and views in the generated bindings.
Code and tests are based on the implementation of the [AllowShared] attribute.
Additional tests for the new JSAPIs will be added as part of bug 1674777.
Depends on D102911
Assignee | ||
Comment 3•4 years ago
|
||
Adds useRegisterOrIndexConstant to check this during lowering, and also uses
ArrayOffsetFitsInInt32 in codegen to assert no overflow.
Depends on D102738
Comment 4•4 years ago
|
||
Comment on attachment 9199488 [details]
Bug 1688616 part 22 - Guard against int32 overflow in offset computations. r?anba!
Revision D103154 was moved to bug 1687441. Setting attachment 9199488 [details] to obsolete.
Comment 6•4 years ago
|
||
Backed out for causing failures on test_large_arraybuffers.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/d6481478a8e01366fb3af2e0788aa6666429d5f1
Failure log: https://treeherder.mozilla.org/logviewer?job_id=328324023&repo=autoland&lineNumber=2539
Assignee | ||
Comment 7•4 years ago
|
||
Oh oops, these testing functions are only available in debug builds. I'll fix the test.
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/61e9fa98634c
https://hg.mozilla.org/mozilla-central/rev/d31e8c40be6a
Assignee | ||
Updated•4 years ago
|
Description
•