DescriptionEnforce ScriptForbiddenScope for user scripts.
ScriptForbiddenScope used to trigger a fatal assert if Blink tried to
execute script in a forbidden scope. This was problematic because
plugins often tried to run scripts inside these scopes.
To prevent these crashes, AllowSuperUnsafeScripts was added as an opt
out to allow plugin-triggered scripts to execute script anyway in these
dangerous contexts. This lead to bugs like https://crbug.com/367210,
where something that should be "impossible" wasn't.
In order to prevent random code from having to work around edge cases
that only happen when script shouldn't even be running, the entry points
for executing user script have been updated to first check if scripting
is forbidden. If it is, they just return undefined or an empty object as
appropriate.
A followup patch will attempt to apply a similar approach for handling
internal scripts.
BUG=363099, 371084
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183650
Patch Set 1 #Patch Set 2 : Getting ambitious #
Total comments: 2
Patch Set 3 : Make it stack allocated again #Patch Set 4 : Trim superfluous includes #
Total comments: 6
Patch Set 5 : Consistify #
Messages
Total messages: 16 (3 generated)
|