| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index c518dcc62546412e7d180c0de22139abe78270f6..fe14b921ab43206d21c8ee125bed77aa2818a3d5 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -135,6 +135,7 @@
|
| #include "core/events/ScopedEventQueue.h"
|
| #include "core/events/VisualViewportResizeEvent.h"
|
| #include "core/events/VisualViewportScrollEvent.h"
|
| +#include "core/frame/ContentSettingsClient.h"
|
| #include "core/frame/DOMTimer.h"
|
| #include "core/frame/DOMVisualViewport.h"
|
| #include "core/frame/EventHandlerRegistry.h"
|
| @@ -5635,14 +5636,14 @@ bool Document::canExecuteScripts(ReasonForCallingCanExecuteScripts reason) {
|
| DCHECK(frame())
|
| << "you are querying canExecuteScripts on a non contextDocument.";
|
|
|
| - LocalFrameClient* client = frame()->loader().client();
|
| - if (!client)
|
| + ContentSettingsClient* settingsClient = frame()->contentSettingsClient();
|
| + if (!settingsClient)
|
| return false;
|
|
|
| Settings* settings = frame()->settings();
|
| - if (!client->allowScript(settings && settings->getScriptEnabled())) {
|
| + if (!settingsClient->allowScript(settings && settings->getScriptEnabled())) {
|
| if (reason == AboutToExecuteScript)
|
| - client->didNotAllowScript();
|
| + settingsClient->didNotAllowScript();
|
|
|
| return false;
|
| }
|
|
|