Bug 155169 - synthesizePrototype() and friends need to be followed by exception checks (or equivalent).
Summary: synthesizePrototype() and friends need to be followed by exception checks (or...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 154865
  Show dependency treegraph
 
Reported: 2016-03-08 07:20 PST by Mark Lam
Modified: 2016-03-08 12:58 PST (History)
7 users (show)

See Also:


Attachments
x86_64 benchmark result. (68.60 KB, text/plain)
2016-03-08 07:24 PST, Mark Lam
no flags Details
proposed patch. (44.50 KB, patch)
2016-03-08 09:21 PST, Mark Lam
mark.lam: review-
Details | Formatted Diff | Diff
proposed patch 2: with rebased binding test result. (45.46 KB, patch)
2016-03-08 12:41 PST, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-03-08 07:20:55 PST
Failure to do so can result in the new exceptions being thrown (and thereby obscuring) an existing exception that has been thrown but not handled yet.  It may also mean that the VM will continue running on potentially unstable state, and may have undesirable consequences.

I first observed this in some failed assertion while running tests on a patch for https://bugs.webkit.org/show_bug.cgi?id=154865.
Comment 1 Mark Lam 2016-03-08 07:24:04 PST
Created attachment 273294 [details]
x86_64 benchmark result.

I did a patch where I changed synthesizePrototype() and JSValue::isObjectSlow() to return a nullptr when they fail and an exception is thrown.  With that patch, the perf numbers are neutral.

Patch coming soon.
Comment 2 Mark Lam 2016-03-08 09:21:38 PST
Created attachment 273299 [details]
proposed patch.
Comment 3 Mark Lam 2016-03-08 09:57:22 PST
Comment on attachment 273299 [details]
proposed patch.

Will rebase bindings test result.
Comment 4 Mark Lam 2016-03-08 12:41:14 PST
Created attachment 273318 [details]
proposed patch 2: with rebased binding test result.

This patch has been run on the api tests, binding tests, JSC tests, and layout tests with no regression (AFAIK).
Comment 5 Geoffrey Garen 2016-03-08 12:52:56 PST
Comment on attachment 273318 [details]
proposed patch 2: with rebased binding test result.

r=me
Comment 6 Mark Lam 2016-03-08 12:58:17 PST
Thanks for the review.  Landed in r197794: <http://trac.webkit.org/r197794>.