<?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>73183</bug_id>
          
          <creation_ts>2011-11-27 19:27:03 -0800</creation_ts>
          <short_desc>REGRESSION (r101201): Crash inside WebKit::WebInspector::didClose() when closing any tab</short_desc>
          <delta_ts>2011-12-02 12:32:24 -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>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kevin M. Dean">kevin</reporter>
          <assigned_to name="Pavel Feldman">pfeldman</assigned_to>
          <cc>artmeakin</cc>
    
    <cc>juanfc</cc>
    
    <cc>mitz</cc>
    
    <cc>mmcneil</cc>
    
    <cc>mrowe</cc>
    
    <cc>ossy</cc>
    
    <cc>pfeldman</cc>
    
    <cc>phiw2</cc>
    
    <cc>svetloslav</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>509540</commentid>
    <comment_count>0</comment_count>
    <who name="Kevin M. Dean">kevin</who>
    <bug_when>2011-11-27 19:27:03 -0800</bug_when>
    <thetext>If I have more than one tab open and close one of the tabs. The WebProcess crashes and reloads the remaining tabs.

Note that the Web Inspector isn&apos;t even open at the time when the crash occurs.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit2             	0x0000000103c542a0 WebKit::WebInspector::didClose() + 18
1   com.apple.WebKit2             	0x0000000103bdf814 WebKit::WebInspectorClient::inspectorDestroyed() + 18
2   com.apple.WebCore             	0x0000000104587fc5 WebCore::InspectorController::inspectedPageDestroyed() + 85
3   com.apple.WebCore             	0x000000010490eeed WebCore::Page::~Page() + 397
4   com.apple.WebKit2             	0x0000000103be8db8 WTF::OwnPtr&lt;WebCore::Page&gt;::clear() + 36
5   com.apple.WebKit2             	0x0000000103be2189 WebKit::WebPage::close() + 315
6   com.apple.WebKit2             	0x0000000103baafd7 CoreIPC::Connection::dispatchMessage(CoreIPC::Connection::Message&lt;CoreIPC::ArgumentDecoder&gt;&amp;) + 175
7   com.apple.WebKit2             	0x0000000103bac409 CoreIPC::Connection::dispatchMessages() + 147
8   com.apple.WebKit2             	0x0000000103bc601b RunLoop::performWork() + 111
9   com.apple.WebKit2             	0x0000000103bc6357 RunLoop::performWork(void*) + 75
10  com.apple.CoreFoundation      	0x00007fff97b77b51 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
11  com.apple.CoreFoundation      	0x00007fff97b773bd __CFRunLoopDoSources0 + 253
12  com.apple.CoreFoundation      	0x00007fff97b9e1a9 __CFRunLoopRun + 905
13  com.apple.CoreFoundation      	0x00007fff97b9dae6 CFRunLoopRunSpecific + 230
14  com.apple.HIToolbox           	0x00007fff910003d3 RunCurrentEventLoopInMode + 277
15  com.apple.HIToolbox           	0x00007fff9100763d ReceiveNextEventCommon + 355
16  com.apple.HIToolbox           	0x00007fff910074ca BlockUntilNextEventMatchingListInMode + 62
17  com.apple.AppKit              	0x00007fff8f2e03f1 _DPSNextEvent + 659
18  com.apple.AppKit              	0x00007fff8f2dfcf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
19  com.apple.AppKit              	0x00007fff8f2dc62d -[NSApplication run] + 470
20  com.apple.WebKit2             	0x0000000103bc6517 RunLoop::run() + 67
21  com.apple.WebKit2             	0x0000000103c0c5d4 WebKit::WebProcessMain(WebKit::CommandLine const&amp;) + 678
22  com.apple.WebKit2             	0x0000000103bdfb19 WebKitMain + 285
23  com.apple.WebProcess          	0x0000000103b6ee5f main + 219
24  com.apple.WebProcess          	0x0000000103b6ed7c start + 52</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509648</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-11-28 01:33:33 -0800</bug_when>
    <thetext>The immediate reason for this crash is:

void WebInspectorClient::closeInspectorFrontend()
{
    m_page-&gt;inspector()-&gt;didClose();
}

m_page-&gt;inspector() is returning 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509652</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-11-28 01:38:15 -0800</bug_when>
    <thetext>And that happens because WebPage marks itself as closed in WebPage::close before the WebCore::Page is torn down. Does WebInspectorClient::inspectorDestroyed just need to grow a null check?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509670</commentid>
    <comment_count>3</comment_count>
      <attachid>116715</attachid>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-11-28 02:05:43 -0800</bug_when>
    <thetext>Created attachment 116715
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509675</commentid>
    <comment_count>4</comment_count>
      <attachid>116715</attachid>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-11-28 02:09:06 -0800</bug_when>
    <thetext>Comment on attachment 116715
Patch

Given that ::inspector() is more than a trivial getter I think it’d be preferable to do:


    if (WebInspector* inspector = m_page-&gt;inspector())                                                                                                                              
        inspector-&gt;didClose();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509676</commentid>
    <comment_count>5</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-11-28 02:09:59 -0800</bug_when>
    <thetext>Committed r101239: &lt;http://trac.webkit.org/changeset/101239&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509707</commentid>
    <comment_count>6</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-11-28 03:36:31 -0800</bug_when>
    <thetext>*** Bug 73188 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509876</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-11-28 09:12:48 -0800</bug_when>
    <thetext>*** Bug 73223 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509891</commentid>
    <comment_count>8</comment_count>
    <who name="">mitz</who>
    <bug_when>2011-11-28 09:44:10 -0800</bug_when>
    <thetext>&lt;rdar://problem/10489008&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509898</commentid>
    <comment_count>9</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2011-11-28 09:49:04 -0800</bug_when>
    <thetext>*** Bug 73222 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>510811</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-11-29 08:54:22 -0800</bug_when>
    <thetext>*** Bug 73207 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>514010</commentid>
    <comment_count>11</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-12-02 12:32:24 -0800</bug_when>
    <thetext>*** Bug 73657 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>116715</attachid>
            <date>2011-11-28 02:05:43 -0800</date>
            <delta_ts>2011-11-28 02:09:06 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-73183-20111128140541.patch</filename>
            <type>text/plain</type>
            <size>1417</size>
            <attacher name="Pavel Feldman">pfeldman</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTAxMjMyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggNWU1N2FmYzA2MGQxYjNm
NDZlYzgyM2NkOGJkOTVlODI0MmE4OWZmNC4uYjJmN2M3NGNiNGFhNGJhYmY5ZjQwZThmODZkOWQ0
MGY3N2RiMzEzZSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAtMSwzICsxLDEzIEBACisyMDExLTExLTI4ICBQYXZl
bCBGZWxkbWFuICA8cGZlbGRtYW5AY2hyb21pdW0ub3JnPgorCisgICAgICAgIFJFR1JFU1NJT04g
KHIxMDEyMDEpOiBDcmFzaCBpbnNpZGUgV2ViS2l0OjpXZWJJbnNwZWN0b3I6OmRpZENsb3NlKCkg
d2hlbiBjbG9zaW5nIGFueSB0YWIKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hv
d19idWcuY2dpP2lkPTczMTgzCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISku
CisKKyAgICAgICAgKiBXZWJQcm9jZXNzL1dlYkNvcmVTdXBwb3J0L1dlYkluc3BlY3RvckNsaWVu
dC5jcHA6CisgICAgICAgIChXZWJLaXQ6OldlYkluc3BlY3RvckNsaWVudDo6Y2xvc2VJbnNwZWN0
b3JGcm9udGVuZCk6CisKIDIwMTEtMTEtMjggIEJhbGF6cyBLZWxlbWVuICA8a2JhbGF6c0B3ZWJr
aXQub3JnPgogCiAgICAgICAgIFJldmlld2VkIGJ5IFNpbW9uIEhhdXNtYW5uLgpkaWZmIC0tZ2l0
IGEvU291cmNlL1dlYktpdDIvV2ViUHJvY2Vzcy9XZWJDb3JlU3VwcG9ydC9XZWJJbnNwZWN0b3JD
bGllbnQuY3BwIGIvU291cmNlL1dlYktpdDIvV2ViUHJvY2Vzcy9XZWJDb3JlU3VwcG9ydC9XZWJJ
bnNwZWN0b3JDbGllbnQuY3BwCmluZGV4IDU0YjQ3N2UwZjZhYTUxNWViMDc2OGZjYzQ2ZWQ2OWIx
YTRmYjJhZDkuLmVhMTVjN2Y5MzIyOWFhN2NmY2U2ZGI2YWMzY2I5MWRiNTUyZDRlNjIgMTAwNjQ0
Ci0tLSBhL1NvdXJjZS9XZWJLaXQyL1dlYlByb2Nlc3MvV2ViQ29yZVN1cHBvcnQvV2ViSW5zcGVj
dG9yQ2xpZW50LmNwcAorKysgYi9Tb3VyY2UvV2ViS2l0Mi9XZWJQcm9jZXNzL1dlYkNvcmVTdXBw
b3J0L1dlYkluc3BlY3RvckNsaWVudC5jcHAKQEAgLTUxLDcgKzUxLDggQEAgdm9pZCBXZWJJbnNw
ZWN0b3JDbGllbnQ6Om9wZW5JbnNwZWN0b3JGcm9udGVuZChJbnNwZWN0b3JDb250cm9sbGVyKikK
IAogdm9pZCBXZWJJbnNwZWN0b3JDbGllbnQ6OmNsb3NlSW5zcGVjdG9yRnJvbnRlbmQoKQogewot
ICAgIG1fcGFnZS0+aW5zcGVjdG9yKCktPmRpZENsb3NlKCk7CisgICAgaWYgKG1fcGFnZS0+aW5z
cGVjdG9yKCkpCisgICAgICAgIG1fcGFnZS0+aW5zcGVjdG9yKCktPmRpZENsb3NlKCk7CiB9CiAK
IHZvaWQgV2ViSW5zcGVjdG9yQ2xpZW50OjpicmluZ0Zyb250ZW5kVG9Gcm9udCgpCg==
</data>
<flag name="review"
          id="115959"
          type_id="1"
          status="+"
          setter="yurys"
    />
          </attachment>
      

    </bug>

</bugzilla>