Summary: | UIScriptController: script with no async tasks fails if an earlier script registered a callback | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
Component: | Tools / Tests | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, lforschler, ryanhaddad, simon.fraser | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 164766 | ||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2016-11-14 20:16:46 PST
Partial fix: diff --git a/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp b/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp index e2e7b0d1375c4def7e0592faf02c4d65fd9ed887..bb5c9e8becaea698f785a3e5bde20842e6549af7 100644 --- a/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp +++ b/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp @@ -117,6 +117,9 @@ unsigned UIScriptContext::registerCallback(JSValueRef taskCallback, CallbackType if (m_callbacks.contains(type)) unregisterCallback(type); + if (JSValueIsUndefined(m_context.get(), taskCallback)) + return 0; + return prepareForAsyncTask(taskCallback, type); } Created attachment 294893 [details]
Patch
Reverted r208770 for reason: The test added with this change is timing out on mac-wk1. Committed r208795: <http://trac.webkit.org/changeset/208795> (In reply to comment #4) > Reverted r208770 for reason: > > The test added with this change is timing out on mac-wk1. > > Committed r208795: <http://trac.webkit.org/changeset/208795> The test added with this change was timing out on mac-wk1 and causing false positives for other patches. It also looks like the original change was landed before EWS had a chance to complete testing in the first place. The test should be skipped on mac WK1. I'll fix and re-land. Created attachment 294961 [details]
Patch
Comment on attachment 294961 [details] Patch Clearing flags on attachment: 294961 Committed r208816: <http://trac.webkit.org/changeset/208816> All reviewed patches have been landed. Closing bug. |