Title: [117124] trunk/Source/WebKit2
Revision
117124
Author
[email protected]
Date
2012-05-15 12:52:12 -0700 (Tue, 15 May 2012)

Log Message

        [WK2] Crash when dropping a reference to a non-existing file
        https://bugs.webkit.org/show_bug.cgi?id=86505
        <rdar://problem/11402084>

        Reviewed by Darin Adler.

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): Check that
        extension handle actually has a non-null extension. Extensions for non-existent files can not
        exist, so they are passed as null ones.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (117123 => 117124)


--- trunk/Source/WebKit2/ChangeLog	2012-05-15 19:51:45 UTC (rev 117123)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-15 19:52:12 UTC (rev 117124)
@@ -1,3 +1,15 @@
+2012-05-15  Alexey Proskuryakov  <[email protected]>
+
+        [WK2] Crash when dropping a reference to a non-existing file
+        https://bugs.webkit.org/show_bug.cgi?id=86505
+        <rdar://problem/11402084>
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): Check that
+        extension handle actually has a non-null extension. Extensions for non-existent files can not
+        exist, so they are passed as null ones.
+
 2012-05-15  Andy Estes  <[email protected]>
 
         Add WTF_USE_SECURITY_FRAMEWORK and use it in place of the less specific PLATFORM(MAC)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (117123 => 117124)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-05-15 19:51:45 UTC (rev 117123)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-05-15 19:52:12 UTC (rev 117124)
@@ -2198,8 +2198,10 @@
         ASSERT(!m_pendingDropSandboxExtension);
 
         m_pendingDropSandboxExtension = SandboxExtension::create(sandboxExtensionHandle);
-        for (size_t i = 0; i < sandboxExtensionsHandleArray.size(); i++)
-            m_pendingDropExtensionsForFileUpload.append(SandboxExtension::create(sandboxExtensionsHandleArray[i]));
+        for (size_t i = 0; i < sandboxExtensionsHandleArray.size(); i++) {
+            if (RefPtr<SandboxExtension> extension = SandboxExtension::create(sandboxExtensionsHandleArray[i]))
+                m_pendingDropExtensionsForFileUpload.append(extension);
+        }
 
         m_page->dragController()->performDrag(&dragData);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to