<?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>31108</bug_id>
          
          <creation_ts>2009-11-04 01:05:33 -0800</creation_ts>
          <short_desc>[V8] REGRESSION: Pause on exception is broken</short_desc>
          <delta_ts>2009-11-05 10:36:03 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</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>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yury Semikhatsky">yurys</reporter>
          <assigned_to name="Jian Li">jianli</assigned_to>
          <cc>abarth</cc>
    
    <cc>dglazkov</cc>
    
    <cc>jianli</cc>
    
    <cc>levin</cc>
    
    <cc>pfeldman</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>160366</commentid>
    <comment_count>0</comment_count>
      <attachid>42462</attachid>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2009-11-04 01:05:33 -0800</bug_when>
    <thetext>Created attachment 42462
A test page

What steps will reproduce the problem?
1. Open the attached page.
2. Open devtools and make sure &apos;Pause on exception&apos; is on(by default it is).
3. Click &apos;Test&apos; button.

What is the expected output?
Execution is paused inside f();

What do you see instead?
Exception is recorded in console but script execution is not paused in the Scripts panel and you cannot inspect the call stack.

This is a regression introduced by http://trac.webkit.org/changeset/48610</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160430</commentid>
    <comment_count>1</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2009-11-04 06:40:14 -0800</bug_when>
    <thetext>I think we should change MessageCallback added to v8 by V8Proxy. Currently the callback is V8ConsoleMessage::handler but it seems that it just needs to dispatch  the exception message to the right handler(page&apos;s document or worker context).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160459</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-11-04 09:14:05 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; I think we should change MessageCallback added to v8 by V8Proxy. Currently the
&gt; callback is V8ConsoleMessage::handler but it seems that it just needs to
&gt; dispatch  the exception message to the right handler(page&apos;s document or worker
&gt; context).

I&apos;m not too familiar with how the devtools hook in here.  Can you upload a patch that does the above so we can see what it looks like in code?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160467</commentid>
    <comment_count>3</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2009-11-04 09:33:34 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; I think we should change MessageCallback added to v8 by V8Proxy. Currently the
&gt; &gt; callback is V8ConsoleMessage::handler but it seems that it just needs to
&gt; &gt; dispatch  the exception message to the right handler(page&apos;s document or worker
&gt; &gt; context).
&gt; 
&gt; I&apos;m not too familiar with how the devtools hook in here.  Can you upload a
&gt; patch that does the above so we can see what it looks like in code?

We bisected regression to this change and it does not seem to justify well enough why it decided to temporarily set verbose to false in this very place of the code.

The suggested fix is to basically revert trunk/WebCore/bindings/v8/V8AbstractEventListener.cpp change introduced in http://trac.webkit.org/changeset/48610. In fact that is why comment was initially a follow up to that bug.

Note that there is jam&apos;s change that happened in between, but i think it should stay.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160469</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2009-11-04 09:36:01 -0800</bug_when>
    <thetext>Looks like if jianli broke it, he should be the one fixing this, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160526</commentid>
    <comment_count>5</comment_count>
      <attachid>42501</attachid>
    <who name="Jian Li">jianli</who>
    <bug_when>2009-11-04 11:20:56 -0800</bug_when>
    <thetext>Created attachment 42501
Proposed Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160541</commentid>
    <comment_count>6</comment_count>
      <attachid>42501</attachid>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2009-11-04 11:58:32 -0800</bug_when>
    <thetext>Comment on attachment 42501
Proposed Patch

Thanks for fixing this!
We should make &quot;stop on exceptions&quot; work now and worry about dupe logs after.
Please submit a bug if you come across any.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160576</commentid>
    <comment_count>7</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2009-11-04 12:57:51 -0800</bug_when>
    <thetext>This patch will lead to duplicated messages in console. If there is an exception in the handler it will be first reported to the console because the TryCatch is verbose and then it will be reported in reportException.

(In reply to comment #5)
&gt; Created an attachment (id=42501) [details]
&gt; Proposed Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160579</commentid>
    <comment_count>8</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2009-11-04 13:01:10 -0800</bug_when>
    <thetext>Yes, I started to work on the change but we need to prepare for GDD now. I&apos;ll send it later.

(In reply to comment #2)
&gt; I&apos;m not too familiar with how the devtools hook in here.  Can you upload a
&gt; patch that does the above so we can see what it looks like in code?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160622</commentid>
    <comment_count>9</comment_count>
      <attachid>42526</attachid>
    <who name="Jian Li">jianli</who>
    <bug_when>2009-11-04 14:58:49 -0800</bug_when>
    <thetext>Created attachment 42526
Proposed Patch

Fixed the problem that duplicate error messages could be shown in the console.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160738</commentid>
    <comment_count>10</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2009-11-04 23:06:38 -0800</bug_when>
    <thetext>This patch seems to fix the issue with console duplicates. But please add a FIXME comment and file a bug for this. We should not discriminate between different ScriptExecutionContext types when reporting exceptions.

(In reply to comment #9)
&gt; Created an attachment (id=42526) [details]
&gt; Proposed Patch
&gt; 
&gt; Fixed the problem that duplicate error messages could be shown in the console.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160743</commentid>
    <comment_count>11</comment_count>
      <attachid>42526</attachid>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2009-11-04 23:09:42 -0800</bug_when>
    <thetext>Comment on attachment 42526
Proposed Patch

r+ given FIXME is added and bug is filed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>160872</commentid>
    <comment_count>12</comment_count>
    <who name="Jian Li">jianli</who>
    <bug_when>2009-11-05 10:36:03 -0800</bug_when>
    <thetext>Bug filed: https://bugs.webkit.org/show_bug.cgi?id=31171

FIXME added and committed as http://trac.webkit.org/changeset/50568.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>42462</attachid>
            <date>2009-11-04 01:05:33 -0800</date>
            <delta_ts>2009-11-04 01:05:33 -0800</delta_ts>
            <desc>A test page</desc>
            <filename>pause-on-exception.html</filename>
            <type>text/html</type>
            <size>222</size>
            <attacher name="Yury Semikhatsky">yurys</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8aGVhZD4NCjxzY3JpcHQ+DQpmdW5jdGlvbiBmKCkgew0KICByZXR1cm4gdW5rbm93
bl92YXI7DQp9DQoNCmZ1bmN0aW9uIGhhbmRsZUNsaWNrKCkgew0KICB2YXIgbyA9IGYoKTsNCn0N
Cjwvc2NyaXB0Pg0KPC9oZWFkPg0KPGJvZHk+DQo8aW5wdXQgdHlwZT0nYnV0dG9uJyBvbmNsaWNr
PSdoYW5kbGVDbGljaygpJyB2YWx1ZT0nVGVzdCcvPg0KPC9ib2R5Pg0KPC9odG1sPg0K
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42501</attachid>
            <date>2009-11-04 11:20:56 -0800</date>
            <delta_ts>2009-11-04 14:58:49 -0800</delta_ts>
            <desc>Proposed Patch</desc>
            <filename>31108</filename>
            <type>text/plain</type>
            <size>1581</size>
            <attacher name="Jian Li">jianli</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
NmQ3ZmZhNy4uZmZkNmMzMiAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxMyBAQAorMjAwOS0xMS0wNCAgSmlhbiBMaSAgPGpp
YW5saUBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISku
CisKKyAgICAgICAgQnVnIDMxMTA4IC0gW1Y4XSBSRUdSRVNTSU9OOiBQYXVzZSBvbiBleGNlcHRp
b24gaXMgYnJva2VuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNn
aT9pZD0zMTEwOAorCisgICAgICAgICogYmluZGluZ3MvdjgvVjhBYnN0cmFjdEV2ZW50TGlzdGVu
ZXIuY3BwOgorICAgICAgICAoV2ViQ29yZTo6VjhBYnN0cmFjdEV2ZW50TGlzdGVuZXI6Omludm9r
ZUV2ZW50SGFuZGxlcik6CisKIDIwMDktMTEtMDMgIEplcmVteSBPcmxvdyAgPGpvcmxvd0BjaHJv
bWl1bS5vcmc+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgRGFyaW4gRmlzaGVyLgpkaWZmIC0tZ2l0
IGEvV2ViQ29yZS9iaW5ka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IgYWxsIGV4aXQgcGF0aHMgdGhyb3VnaCB0aGlzIG1ldGhvZC4KLSAgICAgICAg
dHJ5Q2F0Y2guU2V0VmVyYm9zZSh0cnVlKTsKICAgICAgICAgaWYgKHNhdmVkRXZlbnQuSXNFbXB0
eSgpKQogICAgICAgICAgICAgdjhDb250ZXh0LT5HbG9iYWwoKS0+U2V0SGlkZGVuVmFsdWUoZXZl
bnRTeW1ib2wsIHY4OjpVbmRlZmluZWQoKSk7CiAgICAgICAgIGVsc2UK
</data>
<flag name="review"
          id="24043"
          type_id="1"
          status="+"
          setter="pfeldman"
    />
    <flag name="commit-queue"
          id="24044"
          type_id="3"
          status="-"
          setter="jianli"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42526</attachid>
            <date>2009-11-04 14:58:49 -0800</date>
            <delta_ts>2009-11-04 23:09:42 -0800</delta_ts>
            <desc>Proposed Patch</desc>
            <filename>31108_2</filename>
            <type>text/plain</type>
            <size>2513</size>
            <attacher name="Jian Li">jianli</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
NmQ3ZmZhNy4uY2YwMjY4ZiAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNSBAQAorMjAwOS0xMS0wNCAgSmlhbiBMaSAgPGpp
YW5saUBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISku
CisKKyAgICAgICAgQnVnIDMxMTA4IC0gW1Y4XSBSRUdSRVNTSU9OOiBQYXVzZSBvbiBleGNlcHRp
b24gaXMgYnJva2VuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNn
aT9pZD0zMTEwOAorCis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0aW9uQ2F0Y2hlcikKICAgICAgICAgc291cmNlVVJMID0gdG9XZWJDb3JlU3RyaW5n
KG1lc3NhZ2UtPkdldFNjcmlwdFJlc291cmNlTmFtZSgpKTsKICAgICB9CiAKLSAgICBnZXRTY3Jp
cHRFeGVjdXRpb25Db250ZXh0KHNjcmlwdFN0YXRlKS0+cmVwb3J0RXhjZXB0aW9uKGVycm9yTWVz
c2FnZSwgbGluZU51bWJlciwgc291cmNlVVJMKTsKKyAgICAvLyBEbyBub3QgcmVwb3J0IHRoZSBl
eGNlcHRpb24gaWYgdGhlIGN1cnJlbnQgZXhlY3V0aW9uIGNvbnRleHQgaXMgRG9jdW1lbnQgYmVj
YXVzZSB3ZSBkbyBub3Qgd2FudCB0byBsZWFkIHRvIGR1cGxpY2F0ZSBlcnJvciBtZXNzYWdlcyBp
biB0aGUgY29uc29sZS4KKyAgICBTY3JpcHRFeGVjdXRpb25Db250ZXh0KiBjb250ZXh0ID0gZ2V0
U2NyaXB0RXhlY3V0aW9uQ29udGV4dChzY3JpcHRTdGF0ZSk7CisgICAgaWYgKCFjb250ZXh0LT5p
c0RvY3VtZW50KCkpCisgICAgICBjb250ZXh0LT5yZXBvcnRFeGNlcHRpb24oZXJyb3JNZXNzYWdl
LCBsaW5lTnVtYmVyLCBzb3VyY2VVUkwpOwogICAgIGV4Y2VwdGlvbkNhdGNoZXIuUmVzZXQoKTsK
IH0KIAo=
</data>
<flag name="review"
          id="24070"
          type_id="1"
          status="+"
          setter="pfeldman"
    />
    <flag name="commit-queue"
          id="24071"
          type_id="3"
          status="-"
          setter="jianli"
    />
          </attachment>
      

    </bug>

</bugzilla>