Bug 172513 - REGRESSION(r217051): Automation sessions fail to complete bootstrap
Summary: REGRESSION(r217051): Automation sessions fail to complete bootstrap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-23 11:24 PDT by BJ Burg
Modified: 2017-05-23 17:01 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.88 KB, patch)
2017-05-23 13:42 PDT, BJ Burg
no flags Details | Formatted Diff | Diff
For landing (3.01 KB, patch)
2017-05-23 14:34 PDT, BJ Burg
no flags Details | Formatted Diff | Diff
For landing (3.01 KB, patch)
2017-05-23 15:35 PDT, BJ Burg
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (33.40 MB, application/zip)
2017-05-23 16:39 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-05-23 11:24:40 PDT
We got too strict.
Comment 1 BJ Burg 2017-05-23 11:24:53 PDT
<rdar://problem/32338354>
Comment 2 BJ Burg 2017-05-23 13:42:53 PDT
Created attachment 311046 [details]
Patch
Comment 3 Joseph Pecoraro 2017-05-23 14:07:10 PDT
Comment on attachment 311046 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:14
> +        WIRAutomatically is an optional key in the setup message. In the relay, this key gets copied
> +        into an NSDictionary as NSNull if the key isn't present in a forwarded command.

I don't see how this can happen. It could be optional but as it exists right now I don't think it is.

> Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:58
> +#define BAIL_IF_UNEXPECTED_TYPE_ALLOWING_NIL(expr, classExpr)   \
> +    do {                                                        \
> +        id value = (expr);                                      \
> +        if ([value isEqualTo:[NSNull null]])                    \
> +            expr = value = nil;                                 \

This should be named differently since we have the ALLOWING_NIL name in WebInspector which doesn't check for NSNull. Also its hiding an operation that I don't think should be hidden. I'd rather see two operations:

    CONVERT_NSNULL_TO_NIL(automaticallyPauseNumber);
    BAIL_IF_UNEXPECTED_TYPE_ALLOWING_NIL(...);

That said, I still don't believe it should even be NSNull.
Comment 4 Joseph Pecoraro 2017-05-23 14:10:53 PDT
(In reply to Joseph Pecoraro from comment #3)
> Comment on attachment 311046 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=311046&action=review
> 
> > Source/JavaScriptCore/ChangeLog:14
> > +        WIRAutomatically is an optional key in the setup message. In the relay, this key gets copied
> > +        into an NSDictionary as NSNull if the key isn't present in a forwarded command.
> 
> I don't see how this can happen. It could be optional but as it exists right
> now I don't think it is.

Oh. Apparently this is possible only for Web Driver. Thats unfortunate.


> > Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:58
> > +#define BAIL_IF_UNEXPECTED_TYPE_ALLOWING_NIL(expr, classExpr)   \
> > +    do {                                                        \
> > +        id value = (expr);                                      \
> > +        if ([value isEqualTo:[NSNull null]])                    \
> > +            expr = value = nil;                                 \
> 
> This should be named differently since we have the ALLOWING_NIL name in
> WebInspector which doesn't check for NSNull. Also its hiding an operation
> that I don't think should be hidden. I'd rather see two operations:
> 
>     CONVERT_NSNULL_TO_NIL(automaticallyPauseNumber);
>     BAIL_IF_UNEXPECTED_TYPE_ALLOWING_NIL(...);
> 
> That said, I still don't believe it should even be NSNull.

Splitting this up into two operations would be much clearer.

r=me with that change
Comment 5 BJ Burg 2017-05-23 14:34:12 PDT
Created attachment 311053 [details]
For landing
Comment 6 BJ Burg 2017-05-23 15:35:12 PDT
Created attachment 311067 [details]
For landing
Comment 7 Build Bot 2017-05-23 16:39:53 PDT
Comment on attachment 311067 [details]
For landing

Attachment 311067 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3802999

New failing tests:
fetch/closing-while-fetching-blob.html
fast/css/target-fragment-match.html
Comment 8 Build Bot 2017-05-23 16:39:56 PDT
Created attachment 311074 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 9 BJ Burg 2017-05-23 17:01:54 PDT
Committed r217309: <http://trac.webkit.org/changeset/217309>