Summary: | test262: @isConstructor incorrectly thinks Math.cos is a constructor | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||
Component: | JavaScriptCore | Assignee: | Joseph Pecoraro <joepeck> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, keith_miller, mark.lam, msaboff, saam | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Joseph Pecoraro
2016-10-14 01:55:10 PDT
Created attachment 291596 [details]
[PATCH] Proposed Fix
Created attachment 291599 [details]
[PATCH] Proposed Fix
Some additional test cases.
Comment on attachment 291599 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=291599&action=review r=me > JSTests/stress/is-constructor.js:6 > +let isConstructor = createBuiltin("(function(c) { return @isConstructor(c); })"); This is a nice test. Comment on attachment 291599 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=291599&action=review r=me >> JSTests/stress/is-constructor.js:6 >> +let isConstructor = createBuiltin("(function(c) { return @isConstructor(c); })"); > > This is a nice test. This is a nice test. > Source/JavaScriptCore/runtime/JSFunction.cpp:576 > + if (thisObject->nativeConstructor() == callHostFunctionAsConstructor) Do we get a new kind of error message when we try to "new" non constructor host functions? Comment on attachment 291599 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=291599&action=review >> Source/JavaScriptCore/runtime/JSFunction.cpp:576 >> + if (thisObject->nativeConstructor() == callHostFunctionAsConstructor) > > Do we get a new kind of error message when we try to "new" non constructor host functions? Nope, `new Math.cos` produces the exact same error message! Comment on attachment 291599 [details] [PATCH] Proposed Fix Clearing flags on attachment: 291599 Committed r207347: <http://trac.webkit.org/changeset/207347> All reviewed patches have been landed. Closing bug. |