| 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 9e41f765649fb17d020fe6f900fca37b8307dda5..cddd7e790b3509a90851794a87e41c75dce4ff5f 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"
|
| @@ -5638,14 +5639,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;
|
| }
|
|
|