From 0c68849bcf377b61d09c3827b1b1f37808345d47 Mon Sep 17 00:00:00 2001 From: "ap@apple.com" Date: Wed, 18 Jan 2012 22:37:34 +0000 Subject: [PATCH] [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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105323 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 10 ++++++++++ .../WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 4d2a7af..70794c1 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,13 @@ +2012-01-17 Alexey Proskuryakov + + [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 Provide access to user's list of preferred languages diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp index a8a806e..e09ada4 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp @@ -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. -- 2.7.4