Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1052)

Unified Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more runScriptsAtDocumentElementAvailable + comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index d42a6374d22a590076ba48d245a25d7284223f1c..5549d5e16c0347d4889b32a6f2c4de40b749f14c 100644
--- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -187,6 +187,20 @@ void FrameLoaderClientImpl::documentElementAvailable()
m_webFrame->viewImpl()->mainFrameDocumentElementAvailable();
}
+void FrameLoaderClientImpl::runScriptsAtDocumentElementAvailable()
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->runScriptsAtDocumentElementAvailable(m_webFrame);
+ // The callback might have deleted the frame, do not use |this|!
+}
+
+void FrameLoaderClientImpl::runScriptsAtDocumentReady()
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->runScriptsAtDocumentReady(m_webFrame);
+ // The callback might have deleted the frame, do not use |this|!
+}
+
void FrameLoaderClientImpl::didCreateScriptContext(v8::Local<v8::Context> context, int extensionGroup, int worldId)
{
if (m_webFrame->client())

Powered by Google App Engine
This is Rietveld 408576698