Instead, a rejected promise should be returned.
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.
Created attachment 288945 [details] Patch
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
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
Created attachment 288952 [details] Patch
Created attachment 289041 [details] Patch for landing
Comment on attachment 289041 [details] Patch for landing Clearing flags on attachment: 289041 Committed r206011: <http://trac.webkit.org/changeset/206011>
All reviewed patches have been landed. Closing bug.