Bug 187915

Summary: Add some asserts to help diagnose a crash.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, keith_miller, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. msaboff: review+

Description Mark Lam 2018-07-23 11:36:37 PDT
<rdar://problem/42508166>
Comment 1 Mark Lam 2018-07-23 11:41:28 PDT
Created attachment 345589 [details]
proposed patch.
Comment 2 Michael Saboff 2018-07-23 11:43:13 PDT
Comment on attachment 345589 [details]
proposed patch.

r=me
Comment 3 Saam Barati 2018-07-23 11:59:46 PDT
Comment on attachment 345589 [details]
proposed patch.

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

> Source/JavaScriptCore/bytecode/CodeBlock.cpp:2424
> +        RELEASE_ASSERT(jitType() == JITCode::BaselineJIT);

why not WTFCrashWithInfo?
Comment 4 Mark Lam 2018-07-23 12:07:09 PDT
(In reply to Saam Barati from comment #3)
> Comment on attachment 345589 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=345589&action=review
> 
> > Source/JavaScriptCore/bytecode/CodeBlock.cpp:2424
> > +        RELEASE_ASSERT(jitType() == JITCode::BaselineJIT);
> 
> why not WTFCrashWithInfo?

I just didn't think to use that.  I'll change this to:
    CRASH_WITH_INFO(type);
Comment 5 Mark Lam 2018-07-23 12:29:44 PDT
(In reply to Mark Lam from comment #4)
> I just didn't think to use that.  I'll change this to:
>     CRASH_WITH_INFO(type);

Make that:
    CRASH_WITH_INFO(bitwise_cast<uintptr_t>(jitCode().get()), type);
Comment 6 Mark Lam 2018-07-23 12:33:32 PDT
Thanks for the reviews.  Landed in r234106: <http://trac.webkit.org/r234106>.