Bug 157491 - Crash beneath ObjCCallbackFunctionImpl::call
Summary: Crash beneath ObjCCallbackFunctionImpl::call
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-09 14:48 PDT by Michael Saboff
Modified: 2016-05-09 20:21 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.46 KB, patch)
2016-05-09 18:55 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2016-05-09 14:48:57 PDT
It appears that some Promise builtin code is throwing an exception.  The exception is still set in the VM when we later call tryUnwrapObjcObject() from ObjCCallbackFunctionImpl::call().
Comment 1 Michael Saboff 2016-05-09 14:49:21 PDT
<rdar://problem/25867374>
Comment 2 Michael Saboff 2016-05-09 18:55:21 PDT
Created attachment 278469 [details]
Patch
Comment 3 Saam Barati 2016-05-09 19:12:29 PDT
Comment on attachment 278469 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:11
> +        Tried creating a test case, but I don't have source for the app.
> +        I can't seem to find the right combination of Promises and ObjC code.

What about just regular JS code?
Like you have two schedules promises.
The first throws
The second should still run. Would we start running the second with an exception in the VM?
Comment 4 Michael Saboff 2016-05-09 19:17:15 PDT
(In reply to comment #3)
> Comment on attachment 278469 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=278469&action=review
> 
> > Source/JavaScriptCore/ChangeLog:11
> > +        Tried creating a test case, but I don't have source for the app.
> > +        I can't seem to find the right combination of Promises and ObjC code.
> 
> What about just regular JS code?
> Like you have two schedules promises.
> The first throws
> The second should still run. Would we start running the second with an
> exception in the VM?

The bug here is when we try to invoke a callback that is an instance function on a wrapped ObjC object.
Comment 5 WebKit Commit Bot 2016-05-09 20:21:52 PDT
Comment on attachment 278469 [details]
Patch

Clearing flags on attachment: 278469

Committed r200610: <http://trac.webkit.org/changeset/200610>
Comment 6 WebKit Commit Bot 2016-05-09 20:21:56 PDT
All reviewed patches have been landed.  Closing bug.