[Mac] Add a flag telling plug-in if it can enter sandbox
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 22:37:34 +0000 (22:37 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 22:37:34 +0000 (22:37 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=76467

        Reviewed by Anders Carlsson.

        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue): Added a private flag.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105323 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp

index 4d2a7af..70794c1 100644 (file)
@@ -1,3 +1,13 @@
+2012-01-17  Alexey Proskuryakov  <ap@apple.com>
+
+        [Mac] Add a flag telling plug-in if it can enter sandbox
+        https://bugs.webkit.org/show_bug.cgi?id=76467
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
+        (WebKit::NPN_GetValue): Added a private flag.
+
 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
 
         Provide access to user's list of preferred languages
index a8a806e..e09ada4 100644 (file)
@@ -408,6 +408,9 @@ static const unsigned WKNVSupportsCompositingCoreAnimationPluginsBool = 74656;
 // Whether the browser expects a non-retained Core Animation layer.
 static const unsigned WKNVExpectsNonretainedLayer = 74657;
 
+// Whether plug-in code is allowed to enter (arbitrary) sandbox for the process.
+static const unsigned WKNVAllowedToEnterSandbox = 74658;
+
 // The Core Animation render server port.
 static const unsigned WKNVCALayerRenderServerPort = 71879;
 
@@ -495,6 +498,10 @@ static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value)
             break;
         }
 
+        case WKNVAllowedToEnterSandbox:
+            *(NPBool*)value = true;
+            break;
+
 #ifndef NP_NO_QUICKDRAW
         case NPNVsupportsQuickDrawBool:
             // We don't support the QuickDraw drawing model.