Bug 174623

Summary: Web Automation: evaluateJavaScriptFunction should always notify the web process before returning early
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, joepeck
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch bburg: review+

Carlos Garcia Campos
Reported 2017-07-18 05:19:28 PDT
It currently returns early if page, frame or scriptObject are nullptr, in which cases the UI process is not notified. This causes test testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs to hang, because message DidEvaluateJavaScriptFunction is never sent when the given frame no longer exists. We should send DidEvaluateJavaScriptFunction with WindowNotFound in case of page is nullptr and FrameNotFound if the frame is nullptr. The scriptObject early return is actually wrong, because scriptObjectForFrame creates a new script if there's isn't one for the given frame.
Attachments
Patch (3.10 KB, patch)
2017-07-18 05:20 PDT, Carlos Garcia Campos
bburg: review+
Carlos Garcia Campos
Comment 1 2017-07-18 05:20:44 PDT
Blaze Burg
Comment 2 2017-07-18 15:20:57 PDT
Comment on attachment 315790 [details] Patch Good catch, r = me
Carlos Garcia Campos
Comment 3 2017-07-18 23:08:38 PDT
Note You need to log in before you can comment on or make changes to this bug.