⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 219952 in webkit


Ignore:
Timestamp:
Jul 26, 2017, 11:32:45 AM (9 years ago)
Author:
BJ Burg
Message:

Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
​https://bugs.webkit.org/show_bug.cgi?id=174828

Reviewed by Tim Horton.

In the previous change I forgot to hoist the HandleArray and message-send out of the
loop, so the code wasn't actually sending fewer messages. That's fixed now.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
(WebKit::WebPageProxy::didChooseFilesForOpenPanel):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r219940 r219952  
     12017-07-26  Brian Burg  <bburg@apple.com>
     2
     3        Use SandboxExtension::HandleArray when sending extensions for file uploads to the web process
     4        https://bugs.webkit.org/show_bug.cgi?id=174828
     5
     6        Reviewed by Tim Horton.
     7
     8        In the previous change I forgot to hoist the HandleArray and message-send out of the
     9        loop, so the code wasn't actually sending fewer messages. That's fixed now.
     10
     11        * UIProcess/WebPageProxy.cpp:
     12        (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
     13        (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
     14
    1152017-07-26  Zan Dobersek  <zdobersek@igalia.com>
    216
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r219887 r219952  
    46904690
    46914691#if ENABLE(SANDBOX_EXTENSIONS)
    4692     for (size_t i = 0; i < fileURLs.size(); ++i) {
    4693         SandboxExtension::HandleArray sandboxExtensionHandles;
    4694         sandboxExtensionHandles.allocate(fileURLs.size());
     4692    SandboxExtension::HandleArray sandboxExtensionHandles;
     4693    sandboxExtensionHandles.allocate(fileURLs.size());
     4694    for (size_t i = 0; i < fileURLs.size(); ++i)
    46954695        SandboxExtension::createHandle(fileURLs[i], SandboxExtension::ReadOnly, sandboxExtensionHandles[i]);
    4696         m_process->send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles), m_pageID);
    4697     }
     4696
     4697    m_process->send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles), m_pageID);
    46984698#endif
    46994699
    … …  
    47114711
    47124712#if ENABLE(SANDBOX_EXTENSIONS)
     4713    SandboxExtension::HandleArray sandboxExtensionHandles;
     4714    sandboxExtensionHandles.allocate(fileURLs.size());
    47134715    for (size_t i = 0; i < fileURLs.size(); ++i) {
    4714         SandboxExtension::HandleArray sandboxExtensionHandles;
    4715         sandboxExtensionHandles.allocate(fileURLs.size());
    47164716        bool createdExtension = SandboxExtension::createHandle(fileURLs[i], SandboxExtension::ReadOnly, sandboxExtensionHandles[i]);
    47174717        if (!createdExtension) {
    … …  
    47214721            continue;
    47224722        }
    4723         m_process->send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles), m_pageID);
    4724     }
     4723    }
     4724
     4725    m_process->send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles), m_pageID);
    47254726#endif
    47264727
Note: See TracChangeset for help on using the changeset viewer.