Bug 159862 - [JSC] Should check Test262Error correctly
Summary: [JSC] Should check Test262Error correctly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-17 08:57 PDT by Yusuke Suzuki
Modified: 2016-07-31 17:38 PDT (History)
8 users (show)

See Also:


Attachments
Patch (7.26 KB, patch)
2016-07-28 12:01 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (8.18 KB, patch)
2016-07-29 01:20 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-07-17 08:57:51 PDT
Currently, Test262Error does not have this.name. So `--exception=Test262Error` does not work.
Comment 1 Yusuke Suzuki 2016-07-17 09:06:32 PDT
https://github.com/tc39/test262/pull/730
Comment 2 Yusuke Suzuki 2016-07-28 12:00:11 PDT
Maybe, performing instanceof is better.
Comment 3 Yusuke Suzuki 2016-07-28 12:01:28 PDT
Created attachment 284802 [details]
Patch
Comment 4 Darin Adler 2016-07-28 15:59:44 PDT
Comment on attachment 284802 [details]
Patch

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

> Source/JavaScriptCore/jsc.cpp:2055
> +    bool isInstanceOfExpectedException = jsCast<JSObject*>(exceptionClass)->hasInstance(exec, exception);

Need to export JSObject::hasInstance to avoid the compilation error.
Comment 5 Yusuke Suzuki 2016-07-29 01:18:19 PDT
Comment on attachment 284802 [details]
Patch

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

Thanks

>> Source/JavaScriptCore/jsc.cpp:2055
>> +    bool isInstanceOfExpectedException = jsCast<JSObject*>(exceptionClass)->hasInstance(exec, exception);
> 
> Need to export JSObject::hasInstance to avoid the compilation error.

Oops, I'll add JS_EXPORT_PRIVATE.
Comment 6 Yusuke Suzuki 2016-07-29 01:20:07 PDT
Created attachment 284852 [details]
Patch
Comment 7 Yusuke Suzuki 2016-07-31 05:26:30 PDT
ping? :)
Comment 8 Yusuke Suzuki 2016-07-31 17:17:02 PDT
Comment on attachment 284852 [details]
Patch

Thanks :)
Comment 9 WebKit Commit Bot 2016-07-31 17:38:32 PDT
Comment on attachment 284852 [details]
Patch

Clearing flags on attachment: 284852

Committed r203957: <http://trac.webkit.org/changeset/203957>
Comment 10 WebKit Commit Bot 2016-07-31 17:38:36 PDT
All reviewed patches have been landed.  Closing bug.