Bug 160773

Summary: The jsc shell's Element host constructor should throw if it fails to construct an object.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: ASSIGNED ---    
Severity: Normal CC: commit-queue, keith_miller, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
none
Fixed tabs. saam: review+

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>.