Bug 160773 - The jsc shell's Element host constructor should throw if it fails to construct an object.
Summary: The jsc shell's Element host constructor should throw if it fails to construc...
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-08-11 11:46 PDT by Mark Lam
Modified: 2016-08-11 14:24 PDT (History)
5 users (show)

See Also:


Attachments
proposed patch. (2.82 KB, patch)
2016-08-11 12:04 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
Fixed tabs. (2.83 KB, patch)
2016-08-11 12:07 PDT, Mark Lam
sbarati: 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-08-11 11:46:09 PDT
The Element object is a test object provided in the jsc shell for testing use only.  JavaScriptCore expects host constructors to either throw an error or return a constructed object.  Element has a host constructor that did not obey this contract.  As a result, the following statement will fail a RELEASE_ASSERT:
    new (Element.bind())

We should fix this.
Comment 1 Mark Lam 2016-08-11 11:46:29 PDT
<rdar://problem/27328608>
Comment 2 Mark Lam 2016-08-11 12:04:41 PDT
Created attachment 285840 [details]
proposed patch.
Comment 3 WebKit Commit Bot 2016-08-11 12:05:33 PDT
Attachment 285840 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/ChangeLog:13:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/ChangeLog:15:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Mark Lam 2016-08-11 12:07:35 PDT
Created attachment 285841 [details]
Fixed tabs.
Comment 5 Mark Lam 2016-08-11 14:24:26 PDT
Thanks for the review.  Landed in r204388: <http://trac.webkit.org/r204388>.