Bug 162011 - Custom promise-returning functions should not throw if callee has not the expected type
Summary: Custom promise-returning functions should not throw if callee has not the exp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-15 00:44 PDT by youenn fablet
Modified: 2016-09-16 00:53 PDT (History)
4 users (show)

See Also:


Attachments
Patch (27.94 KB, patch)
2016-09-15 02:45 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.02 MB, application/zip)
2016-09-15 03:48 PDT, Build Bot
no flags Details
Patch (28.78 KB, patch)
2016-09-15 04:59 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (26.93 KB, patch)
2016-09-16 00:19 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-09-15 00:44:21 PDT
Instead, a rejected promise should be returned.
Comment 1 youenn fablet 2016-09-15 00:49:47 PDT
We could reuse the same trick as for non-custom methods (using callPromiseFunction).
But this would put the constraint that a new promise is returned every time the method is called, which is not always the case.

It might be best to just update GenerateFunctionCastedThis to return a rejected promise.
Comment 2 youenn fablet 2016-09-15 02:45:29 PDT
Created attachment 288945 [details]
Patch
Comment 3 Build Bot 2016-09-15 03:48:54 PDT
Comment on attachment 288945 [details]
Patch

Attachment 288945 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2078487

New failing tests:
http/tests/media/media-stream/disconnected-frame-already.html
Comment 4 Build Bot 2016-09-15 03:48:57 PDT
Created attachment 288949 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 5 youenn fablet 2016-09-15 04:59:53 PDT
Created attachment 288952 [details]
Patch
Comment 6 youenn fablet 2016-09-16 00:19:59 PDT
Created attachment 289041 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2016-09-16 00:53:46 PDT
Comment on attachment 289041 [details]
Patch for landing

Clearing flags on attachment: 289041

Committed r206011: <http://trac.webkit.org/changeset/206011>
Comment 8 WebKit Commit Bot 2016-09-16 00:53:51 PDT
All reviewed patches have been landed.  Closing bug.