<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>13018</bug_id>
          
          <creation_ts>2007-03-08 17:37:31 -0800</creation_ts>
          <short_desc>allow embedders to override the definition of CRASH()</short_desc>
          <delta_ts>2007-03-08 19:25:19 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Fisher (:fishd, Google)">fishd</reporter>
          <assigned_to name="Darin Fisher (:fishd, Google)">fishd</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19828</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-03-08 17:37:31 -0800</bug_when>
    <thetext>allow embedders to override the definition of CRASH()

on some platforms, dereferencing 0xbbadbeef and writing 0 is really not the most ideal way to get attention in response to an assertion failure.

for example, __asm {int 3} is much nicer on the windows platform where JIT debugging can present the user with the option to continue past the assertion with the click of a button, and if you are already running in the debugger, the instruction will be treated like an ordinary breakpoint.  other platforms may have other preferred ways as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19829</commentid>
    <comment_count>1</comment_count>
      <attachid>13551</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-03-08 17:42:58 -0800</bug_when>
    <thetext>Created attachment 13551
patch

simple patch to make it possible for the embedder to override the meaning of CRASH()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19830</commentid>
    <comment_count>2</comment_count>
      <attachid>13551</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-03-08 17:46:02 -0800</bug_when>
    <thetext>Comment on attachment 13551
patch

Do you have a better implementation for any particular platform? The 0xbbadbeef thing is really sorta Mac-OS-X-specific.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19831</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-03-08 18:29:04 -0800</bug_when>
    <thetext>yes, PLATFORM(WIN_OS) should call DebugBreak() or __asm {int 3}.  the latter is good for x86-Linux too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19835</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-03-08 19:25:19 -0800</bug_when>
    <thetext>Landed in r20079.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>13551</attachid>
            <date>2007-03-08 17:42:58 -0800</date>
            <delta_ts>2007-03-08 17:46:02 -0800</delta_ts>
            <desc>patch</desc>
            <filename>crash-patch.diff</filename>
            <type>text/plain</type>
            <size>884</size>
            <attacher name="Darin Fisher (:fishd, Google)">fishd</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDIwMDcx
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsOSBAQAorMjAwNy0wMy0w
OCAgTW9yZ2FuTCAgPG1vcmdhbmwud2Via2l0QHlhaG9vLmNvbT4KKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIHd0Zi9Bc3NlcnRpb25zLmg6IG1ha2Ug
aXQgcG9zc2libGUgdG8gb3ZlcnJpZGUgQ1JBU0gKKwogMjAwNy0wMy0wNyAgQW5yb25nIEh1ICA8
aHVhbnJAeWFob28uY29tPgogCiAgICAgICAgIFJldmlld2VkIGJ5IE1hY2llai4KSW5kZXg6IHd0
Zi9Bc3NlcnRpb25zLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gd3RmL0Fzc2VydGlvbnMuaAkocmV2aXNpb24g
MjAwNzEpCisrKyB3dGYvQXNzZXJ0aW9ucy5oCSh3b3JraW5nIGNvcHkpCkBAIC0xMDIsNyArMTAy
LDkgQEAgdm9pZCBXVEZMb2coY29uc3QgY2hhciAqZmlsZSwgaW50IGxpbmUsIAogCiAvKiBDUkFT
SCAtLSBnZXRzIHVzIGludG8gdGhlIGRlYnVnZ2VyIG9yIHRoZSBjcmFzaCByZXBvcnRlciAtLSBz
aWduYWxzIGFyZSBpZ25vcmVkIGJ5IHRoZSBjcmFzaCByZXBvcnRlciBzbyB3ZSBtdXN0IGRvIGJl
dHRlciAqLwogCisjaWZuZGVmIENSQVNICiAjZGVmaW5lIENSQVNIKCkgKihpbnQgKikodWludHB0
cl90KTB4YmJhZGJlZWYgPSAwCisjZW5kaWYKIAogLyogQVNTRVJULCBBU1NFUlRfV0lUSF9NRVNT
QUdFLCBBU1NFUlRfTk9UX1JFQUNIRUQgKi8KIAo=
</data>
<flag name="review"
          id="5371"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>