Bug 76467 - [Mac] Add a flag telling plug-in if it can enter sandbox
Summary: [Mac] Add a flag telling plug-in if it can enter sandbox
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2012-01-17 11:38 PST by Alexey Proskuryakov
Modified: 2012-03-07 16:13 PST (History)
2 users (show)

See Also:

proposed patch (1.71 KB, patch)
2012-01-17 11:39 PST, Alexey Proskuryakov
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-01-17 11:38:12 PST
A plug-in cannot know if it's running in a process that would tolerate entering sandbox. Let's tell it (a Mac only experiment for now).
Comment 1 Alexey Proskuryakov 2012-01-17 11:39:40 PST
Created attachment 122789 [details]
proposed patch
Comment 2 Anders Carlsson 2012-01-17 12:10:16 PST
Comment on attachment 122789 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122789&action=review

> Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:503
> +        case WKNVAllowedToEnterSandbox:
> +            *(NPBool*)value = true;
> +            break;

Shouldn't this be true only when running in the plug-in process? (Not that it really matters since we don't support in-process plug-ins with WebKit2).
Comment 3 Alexey Proskuryakov 2012-01-17 12:17:02 PST
> we don't support in-process plug-ins with WebKit2

Yes, this is why I made it always return true. Was there a better way to write this?
Comment 4 Alexey Proskuryakov 2012-03-07 16:13:54 PST
This has been landed long ago in <http://trac.webkit.org/changeset/105323>.