Title: [119344] trunk/Source/WebKit2
Revision
119344
Author
[email protected]
Date
2012-06-02 17:47:19 -0700 (Sat, 02 Jun 2012)

Log Message

InjectedBundles' sandbox extensions don't do what we think they do
https://bugs.webkit.org/show_bug.cgi?id=88177

Reviewed by Anders Carlsson.

This cannot be tested with our current infrastructure (or any modifications of the
infrastructure I can think of) since it relies on the bundle being put outside
the build directory where WebKit is put.

* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
(WebKit::InjectedBundle::load):
Use SandboxExtension::consumePermanently() rather than consume(), otherwise,
nulling out the SandboxExtension a few lines later invalidates the extension
we just consumed.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (119343 => 119344)


--- trunk/Source/WebKit2/ChangeLog	2012-06-03 00:41:08 UTC (rev 119343)
+++ trunk/Source/WebKit2/ChangeLog	2012-06-03 00:47:19 UTC (rev 119344)
@@ -1,3 +1,20 @@
+2012-06-02  Sam Weinig  <[email protected]>
+
+        InjectedBundles' sandbox extensions don't do what we think they do
+        https://bugs.webkit.org/show_bug.cgi?id=88177
+
+        Reviewed by Anders Carlsson.
+
+        This cannot be tested with our current infrastructure (or any modifications of the
+        infrastructure I can think of) since it relies on the bundle being put outside
+        the build directory where WebKit is put.
+
+        * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
+        (WebKit::InjectedBundle::load):
+        Use SandboxExtension::consumePermanently() rather than consume(), otherwise,
+        nulling out the SandboxExtension a few lines later invalidates the extension
+        we just consumed.
+
 2012-06-02  Dan Bernstein  <[email protected]>
 
         Reverted the last change.

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp (119343 => 119344)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp	2012-06-03 00:41:08 UTC (rev 119343)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp	2012-06-03 00:47:19 UTC (rev 119344)
@@ -40,7 +40,7 @@
 bool InjectedBundle::load(APIObject* initializationUserData)
 {
     if (m_sandboxExtension) {
-        if (!m_sandboxExtension->consume()) {
+        if (!m_sandboxExtension->consumePermanently()) {
             WTFLogAlways("InjectedBundle::load failed - Could not consume bundle sandbox extension for [%s].\n", m_path.utf8().data());
             return false;
         }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to