<?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>124066</bug_id>
          
          <creation_ts>2013-11-08 13:15:57 -0800</creation_ts>
          <short_desc>Uncaught exceptions raised in promise completion functions are not printed to console</short_desc>
          <delta_ts>2017-04-27 20:37:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>150358</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=147502</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>948810</commentid>
    <comment_count>0</comment_count>
      <attachid>216429</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-11-08 13:15:57 -0800</bug_when>
    <thetext>Created attachment 216429
test case

E.g.

crypto.subtle.generateKey({name: &quot;hmac&quot;, hash: &quot;sha-1&quot;}, true, [&quot;sign&quot;, &quot;verify&quot;]).then(function(result) {
    throw(&quot;See me?&quot;);
});

Marking this as blocking WebCrypto, because it&apos;s super difficult to use WebCrypto form JS when uncaught exceptions are not visible in Inspector. In fact, this is even slowing down writing tests for me, even though I&apos;m only targeting WebKit, and know what and when raises exceptions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>955695</commentid>
    <comment_count>1</comment_count>
      <attachid>218241</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-12-02 16:57:39 -0800</bug_when>
    <thetext>Created attachment 218241
another test case

A test case that doesn&apos;t use WebCrypto.

What happens here is when JSPromiseWrapperCallback::callPromiseWrapperCallback() sees an exception, it immediately clears it, and invokes resolver&apos;s reject callback with the exception as argument. But when there are no reject callbacks registered, it&apos;s just dropped on the floor.

Perhaps the exception shouldn&apos;t be cleared when there are no reject callbacks to handle it, and then JSGlobalObjectCallback could report it in the same way as other code that executes JS does. ScriptController::evaluateInWorld() and JSEventListener::handleEvent() seem like they could serve as models.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1026921</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-08-05 12:14:30 -0700</bug_when>
    <thetext>This sounds bad! The Web Inspector should know about all exceptions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1026922</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-08-05 12:14:38 -0700</bug_when>
    <thetext>&lt;rdar://problem/17920074&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1259311</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-12-12 18:48:08 -0800</bug_when>
    <thetext>There is already some work in this area on bug 150358.

With the HTML Spec&apos;s unhandledpromiserejection / rejectionhandled events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1302465</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-04-27 20:37:48 -0700</bug_when>
    <thetext>This was addressed by: bug 150358

• The first test case is outdated (there is no Promise.fulfill anymore)
• The second test case produces:
[Error] Unhandled Promise Rejection: See me?

*** This bug has been marked as a duplicate of bug 150358 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>216429</attachid>
            <date>2013-11-08 13:15:57 -0800</date>
            <delta_ts>2013-11-08 13:15:57 -0800</delta_ts>
            <desc>test case</desc>
            <filename>exception.html</filename>
            <type>text/html</type>
            <size>358</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8Ym9keT4KPHA+VGhlcmUgaXMgYW4gdW5jYXVnaHQgZXhj
ZXB0aW9uIHJhaXNlZCBoZXJlLCBpdCBzaG91bGQgYmUgcHJpbnRlZCB0byBjb25zb2xlLjwvcD4K
PHNjcmlwdD4KaWYgKCF3aW5kb3cuc3VidGxlKQogICAgd2luZG93LmNyeXB0by5zdWJ0bGUgPSB3
aW5kb3cuY3J5cHRvLndlYmtpdFN1YnRsZTsKCmNyeXB0by5zdWJ0bGUuZ2VuZXJhdGVLZXkoe25h
bWU6ICJobWFjIiwgaGFzaDogInNoYS0xIn0sIHRydWUsIFsic2lnbiIsICJ2ZXJpZnkiXSkudGhl
bihmdW5jdGlvbihyZXN1bHQpIHsKICAgIHRocm93KCJTZWUgbWU/Iik7Cn0pOwo8L3NjcmlwdD4K
PC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>218241</attachid>
            <date>2013-12-02 16:57:39 -0800</date>
            <delta_ts>2013-12-02 16:57:39 -0800</delta_ts>
            <desc>another test case</desc>
            <filename>exception.html</filename>
            <type>text/html</type>
            <size>314</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8Ym9keT4KPHNjcmlwdD4KCndpbmRvdy5vbmVycm9yID0g
ZnVuY3Rpb24oZXJyb3IpIHsgYWxlcnQoIm9uZXJyb3I6ICIgKyBlcnJvcikgfTsKClByb21pc2Uu
ZnVsZmlsbChudWxsKS50aGVuKGZ1bmN0aW9uKCkgewogICAgdGhyb3cgImFhIjsKfSwgZnVuY3Rp
b24oKSB7CiAgICBhbGVydCgiSW4gcmVqZWN0IGZ1bmN0aW9uIDEiKQp9KS8qLnRoZW4odW5kZWZp
bmVkLCBmdW5jdGlvbigpIHsKICAgIGFsZXJ0KCJJbiByZWplY3QgZnVuY3Rpb24gMiIpCn0pOyov
Cgo8L3NjcmlwdD4KCjwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>