<?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>17418</bug_id>
          
          <creation_ts>2008-02-17 17:29:33 -0800</creation_ts>
          <short_desc>REGRESSION: Assertion failure dragging image (JSLock::lockCount() &gt; 0)</short_desc>
          <delta_ts>2008-02-18 10:15:49 -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>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Lilek">dev+webkit</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70992</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2008-02-17 17:29:33 -0800</bug_when>
    <thetext>Dragging an image in ToT on Windows fails the following ASSERT in UString::Rep::createCopying:

JSLock::lockCount() &gt; 0
&lt;http://trac.webkit.org/projects/webkit/browser/trunk/JavaScriptCore/kjs/ustring.cpp#L175&gt;

&gt;	WebKit.dll!KJS::UString::Rep::createCopying(const KJS::UChar * d=0x03f2a4e0, int l=77)  Line 175 + 0x25 bytes	C++
 	WebKit.dll!KJS::UString::UString(const KJS::UChar * c=0x03f2a4e0, int length=77)  Line 442 + 0x11 bytes	C++
 	WebKit.dll!WebCore::String::operator KJS::UString()  Line 644 + 0x28 bytes	C++
 	WebKit.dll!WebCore::KURL::operator KJS::UString()  Line 140 + 0x23 bytes	C++
 	WebKit.dll!WebCore::ClipboardWin::declareAndWriteDragImage(WebCore::Element * element=0x029b03f8, const WebCore::KURL &amp; url={...}, const WebCore::String &amp; title={...}, WebCore::Frame * frame=0x01e1b4f0)  Line 677 + 0x34 bytes	C++
 	WebKit.dll!WebCore::prepareClipboardForImageDrag(WebCore::Frame * src=0x01e1b4f0, WebCore::Clipboard * clipboard=0x0269c410, WebCore::Element * node=0x029b03f8, const WebCore::KURL &amp; linkURL={...}, const WebCore::KURL &amp; imageURL={...}, const WebCore::String &amp; label={...})  Line 558 + 0x42 bytes	C++
 	WebKit.dll!WebCore::DragController::startDrag(WebCore::Frame * src=0x01e1b4f0, WebCore::Clipboard * clipboard=0x0269c410, WebCore::DragOperation srcOp=DragOperationNone, const WebCore::PlatformMouseEvent &amp; dragEvent={...}, const WebCore::IntPoint &amp; dragOrigin={...}, bool isDHTMLDrag=false)  Line 635 + 0x2f bytes	C++
 	WebKit.dll!WebCore::EventHandler::handleDrag(const WebCore::MouseEventWithHitTestResults &amp; event={...})  Line 1755 + 0x44 bytes	C++
 	WebKit.dll!WebCore::EventHandler::handleMouseDraggedEvent(const WebCore::MouseEventWithHitTestResults &amp; event={...})  Line 353 + 0xc bytes	C++
 	WebKit.dll!WebCore::EventHandler::handleMouseMoveEvent(const WebCore::PlatformMouseEvent &amp; mouseEvent={...}, WebCore::HitTestResult * hoveredNode=0x0012f7a4)  Line 1034 + 0xc bytes	C++
 	WebKit.dll!WebCore::EventHandler::mouseMoved(const WebCore::PlatformMouseEvent &amp; event={...})  Line 938 + 0x10 bytes	C++
 	WebKit.dll!WebView::handleMouseEvent(unsigned int message=512, unsigned int wParam=1, long lParam=11534604)  Line 1216 + 0x1d bytes	C++
 	WebKit.dll!WebViewWndProc(HWND__ * hWnd=0x00050112, unsigned int message=512, unsigned int wParam=1, long lParam=11534604)  Line 1634 + 0x14 bytes	C++
 	user32.dll!7e418724() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71022</commentid>
    <comment_count>1</comment_count>
      <attachid>19185</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-02-18 01:51:06 -0800</bug_when>
    <thetext>Created attachment 19185
proposed fix (untested)

As usual, my Windows build is far from completion, but this should fix the issue.

I&apos;m curious why KURL has such a preference for UString.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71051</commentid>
    <comment_count>2</comment_count>
      <attachid>19185</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-02-18 09:30:25 -0800</bug_when>
    <thetext>Comment on attachment 19185
proposed fix (untested)

r=me

The implicit conversion from KURL to UString is a bad idea. I suggest we either remove it or if we decide it&apos;s too valuable to remove, add an implicit conversion to String.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71054</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-02-18 10:15:49 -0800</bug_when>
    <thetext>Committed revision 30369.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>19185</attachid>
            <date>2008-02-18 01:51:06 -0800</date>
            <delta_ts>2008-02-18 09:30:25 -0800</delta_ts>
            <desc>proposed fix (untested)</desc>
            <filename>17418r1_patch.txt</filename>
            <type>text/plain</type>
            <size>1271</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAzMDM2OCkKKysrIFdlYkNvcmUvQ2hhb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Ojpk
ZWNsYXJlQW5kV3JpdGVEcmFnSW0KICAgICBpZiAoaW1hZ2VVUkwuaXNFbXB0eSgpKSAKICAgICAg
ICAgcmV0dXJuOwogCi0gICAgU3RyaW5nIGZ1bGxVUkwgPSBmcmFtZS0+ZG9jdW1lbnQoKS0+Y29t
cGxldGVVUkwocGFyc2VVUkwoaW1hZ2VVUkwpKTsKKyAgICBTdHJpbmcgZnVsbFVSTCA9IGZyYW1l
LT5kb2N1bWVudCgpLT5jb21wbGV0ZVVSTChwYXJzZVVSTChpbWFnZVVSTCkpLnN0cmluZygpOwog
ICAgIGlmIChmdWxsVVJMLmlzRW1wdHkoKSkgCiAgICAgICAgIHJldHVybjsKICAgICBTVEdNRURJ
VU0gbWVkaXVtID0gezB9Owo=
</data>
<flag name="review"
          id="8379"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>