Bug 159862

Summary: [JSC] Should check Test262Error correctly
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, fpizlo, ggaren, keith_miller, mark.lam, msaboff, sbarati
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.