| Index: third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp
|
| index fa788f05a87ee8719f83a883275ee539675bb84e..9acda710530f48c82a190e91d02430a41fcd750f 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp
|
| @@ -62,6 +62,12 @@ v8::Local<v8::Function> V8EventListener::getListenerFunction(
|
| if (isAttribute())
|
| return v8::Local<v8::Function>();
|
|
|
| + // Getting the handleEvent property can runs script in the getter.
|
| + if (ScriptForbiddenScope::isScriptForbidden()) {
|
| + V8ThrowException::throwError(isolate(), "Script execution is forbidden.");
|
| + return v8::Local<v8::Function>();
|
| + }
|
| +
|
| if (listener->IsObject()) {
|
| // Check that no exceptions were thrown when getting the
|
| // handleEvent property and that the value is a function.
|
|
|