Bug 214193 - Add some testing for JSRunLoopTimer
Summary: Add some testing for JSRunLoopTimer
Status: RESOLVED DUPLICATE of bug 214102
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-10 12:29 PDT by Geoffrey Garen
Modified: 2020-07-14 23:04 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.87 KB, patch)
2020-07-10 12:38 PDT, Geoffrey Garen
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2020-07-10 12:29:26 PDT
Add some testing for JSRunLoopTimer
Comment 1 Geoffrey Garen 2020-07-10 12:38:39 PDT
Created attachment 403990 [details]
Patch
Comment 2 Geoffrey Garen 2020-07-10 13:57:01 PDT
I guess I'll just merge this into https://bugs.webkit.org/show_bug.cgi?id=214102

*** This bug has been marked as a duplicate of bug 214102 ***
Comment 3 Darin Adler 2020-07-10 14:14:37 PDT
Comment on attachment 403990 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=403990&action=review

> Tools/TestWebKitAPI/Tests/JavaScriptCore/JSRunLoopTimer.mm:66
> +    auto context = adoptNS([JSContext new]);

So retro to use new instead of alloc/init.

> Tools/TestWebKitAPI/Tests/JavaScriptCore/JSRunLoopTimer.mm:69
> +    while (!s_done) {

Need to set s_done to false in case IncrementalSweeperSecondaryThread test already ran? But what about objects left behind from running that test? Could they result in false negatives for this test?

> Tools/TestWebKitAPI/Tests/JavaScriptCore/JSRunLoopTimer.mm:73
> +                auto jsObject = adoptNS([JSValue valueWithObject:object.get() inContext:context.get()]);

This looks like an overrelease. Should not adopt the result of valueWithObject.

> Tools/TestWebKitAPI/Tests/JavaScriptCore/JSRunLoopTimer.mm:90
> +    while (!s_done) {

Need to set s_done to false in case IncrementalSweeperMainThread test already ran? But what about objects left behind from running that test? Could they result in false negatives for this test?

> Tools/TestWebKitAPI/Tests/JavaScriptCore/JSRunLoopTimer.mm:96
> +                        auto jsObject = adoptNS([JSValue valueWithObject:object.get() inContext:context.get()]);

This looks like an overrelease. Should not adopt the result of valueWithObject.