WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228747
fast/canvas/canvas-crash.html doesn't test what it intends to on iOS
https://bugs.webkit.org/show_bug.cgi?id=228747
Summary
fast/canvas/canvas-crash.html doesn't test what it intends to on iOS
Tim Horton
Reported
2021-08-03 12:10:16 PDT
fast/canvas/canvas-crash.html doesn't test what it intends to on iOS
Attachments
Patch
(10.76 KB, patch)
2021-08-03 12:16 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(13.15 KB, patch)
2021-08-03 15:52 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(12.24 KB, patch)
2021-08-05 16:39 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2021-08-03 12:16:51 PDT
Created
attachment 434850
[details]
Patch
Tim Horton
Comment 2
2021-08-03 12:16:54 PDT
<
rdar://problem/81423634
>
Simon Fraser (smfr)
Comment 3
2021-08-03 12:52:50 PDT
Comment on
attachment 434850
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=434850&action=review
> Source/WebCore/html/HTMLCanvasElement.cpp:115 > +static size_t maxCanvasAreaForTesting; > +static size_t maxActivePixelMemoryForTesting;
Could these be Markable<>?
> Source/WebCore/testing/Internals.cpp:604 > + HTMLCanvasElement::setMaxPixelMemoryForTesting(0); > + HTMLCanvasElement::setMaxCanvasAreaForTesting(0);
Ideally these would take std::optionals
Tim Horton
Comment 4
2021-08-03 15:52:21 PDT
Created
attachment 434868
[details]
Patch
Tim Horton
Comment 5
2021-08-03 15:58:58 PDT
windows newlines oO
Tim Horton
Comment 6
2021-08-04 02:30:34 PDT
Heh, I think the configuration of the stress bot means it runs the test in the same process multiple times, and we hit the limit after a few tries :|
EWS
Comment 7
2021-08-04 02:40:53 PDT
Committed
r280630
(
240243@main
): <
https://commits.webkit.org/240243@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 434868
[details]
.
WebKit Commit Bot
Comment 8
2021-08-04 11:37:58 PDT
Re-opened since this is blocked by
bug 228788
Tim Horton
Comment 9
2021-08-04 11:38:16 PDT
(In reply to Tim Horton from
comment #6
)
> Heh, I think the configuration of the stress bot means it runs the test in > the same process multiple times, and we hit the limit after a few tries :|
Except the same thing happens on the real testers too!
Sam Weinig
Comment 10
2021-08-04 11:47:30 PDT
(In reply to Tim Horton from
comment #9
)
> (In reply to Tim Horton from
comment #6
) > > Heh, I think the configuration of the stress bot means it runs the test in > > the same process multiple times, and we hit the limit after a few tries :| > > Except the same thing happens on the real testers too!
Leak?
Sam Weinig
Comment 11
2021-08-04 11:47:58 PDT
(In reply to Sam Weinig from
comment #10
)
> (In reply to Tim Horton from
comment #9
) > > (In reply to Tim Horton from
comment #6
) > > > Heh, I think the configuration of the stress bot means it runs the test in > > > the same process multiple times, and we hit the limit after a few tries :| > > > > Except the same thing happens on the real testers too! > > Leak?
(or rather, depending on GC to cleanup something big?)
Tim Horton
Comment 12
2021-08-04 11:50:48 PDT
Yes, that. And we reset the max down to the default between each test so it's immediately TOO MUCH CANVAS
Sam Weinig
Comment 13
2021-08-05 07:08:08 PDT
(In reply to Tim Horton from
comment #12
)
> Yes, that. And we reset the max down to the default between each test so > it's immediately TOO MUCH CANVAS
There are two options I can see here. 1) Remove the canvas from the document and force a GC using GCController.collect() to ensure the canvas is full destroyed before moving on to the next test. 2) Implement ActiveDOMObject::stop() for HTMLCanvasElement, and ensure the ImageBuffer is destroyed there. Ideally, we would do #2, but it is a bit more risk, so doing #1 first, and then doing #2 in another change may be the best option here.
Tim Horton
Comment 14
2021-08-05 12:05:50 PDT
(In reply to Sam Weinig from
comment #13
)
> (In reply to Tim Horton from
comment #12
) > > Yes, that. And we reset the max down to the default between each test so > > it's immediately TOO MUCH CANVAS > > There are two options I can see here. > > 1) Remove the canvas from the document and force a GC using > GCController.collect() to ensure the canvas is full destroyed before moving > on to the next test. > 2) Implement ActiveDOMObject::stop() for HTMLCanvasElement, and ensure the > ImageBuffer is destroyed there. > > > Ideally, we would do #2, but it is a bit more risk, so doing #1 first, and > then doing #2 in another change may be the best option here.
https://bugs.webkit.org/show_bug.cgi?id=224500
tracks #2
Tim Horton
Comment 15
2021-08-05 16:29:05 PDT
(In reply to Sam Weinig from
comment #13
)
> (In reply to Tim Horton from
comment #12
) > > Yes, that. And we reset the max down to the default between each test so > > it's immediately TOO MUCH CANVAS > > There are two options I can see here. > > 1) Remove the canvas from the document and force a GC using > GCController.collect() to ensure the canvas is full destroyed before moving > on to the next test.
Oddly, this did not work, but I found a similar-but-even-less-flaky solution that does: resize the canvas before ending the test.
Tim Horton
Comment 16
2021-08-05 16:31:33 PDT
(In reply to Tim Horton from
comment #15
)
> (In reply to Sam Weinig from
comment #13
) > > (In reply to Tim Horton from
comment #12
) > > > Yes, that. And we reset the max down to the default between each test so > > > it's immediately TOO MUCH CANVAS > > > > There are two options I can see here. > > > > 1) Remove the canvas from the document and force a GC using > > GCController.collect() to ensure the canvas is full destroyed before moving > > on to the next test. > > Oddly, this did not work, but I found a similar-but-even-less-flaky solution > that does: resize the canvas before ending the test.
Oh, it's not odd: the test doesn't actually use its <canvas> at all, it uses getCSSCanvasContext()
Tim Horton
Comment 17
2021-08-05 16:39:32 PDT
Created
attachment 435038
[details]
Patch
Sam Weinig
Comment 18
2021-08-05 17:38:21 PDT
(In reply to Tim Horton from
comment #16
)
> (In reply to Tim Horton from
comment #15
) > > (In reply to Sam Weinig from
comment #13
) > > > (In reply to Tim Horton from
comment #12
) > > > > Yes, that. And we reset the max down to the default between each test so > > > > it's immediately TOO MUCH CANVAS > > > > > > There are two options I can see here. > > > > > > 1) Remove the canvas from the document and force a GC using > > > GCController.collect() to ensure the canvas is full destroyed before moving > > > on to the next test. > > > > Oddly, this did not work, but I found a similar-but-even-less-flaky solution > > that does: resize the canvas before ending the test. > > Oh, it's not odd: the test doesn't actually use its <canvas> at all, it uses > getCSSCanvasContext()
Ah, that would makes sense. Those live for the lifetime of the document due to being "name" addressable. Your solution here seems great.
Tim Horton
Comment 19
2021-08-05 17:50:38 PDT
Stress bot is happy this time, I should have listened to it last time!!
EWS
Comment 20
2021-08-05 18:57:05 PDT
Committed
r280715
(
240306@main
): <
https://commits.webkit.org/240306@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 435038
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug