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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2633253002: Split content script injections into multiple tasks (Closed)
Patch Set: comments addressed Created 3 years, 9 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | extensions/common/feature_switch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 6c053bb9bd5128d41aa527ae14c7eecfc6522133..ad91828b3b87252d3f3b61c3b8111bde37220562 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2012,8 +2012,8 @@ void RenderFrameImpl::OnJavaScriptExecuteRequestInIsolatedWorld(
WebScriptSource script = WebScriptSource(WebString::fromUTF16(jscript));
JavaScriptIsolatedWorldRequest* request = new JavaScriptIsolatedWorldRequest(
id, notify_result, routing_id_, weak_factory_.GetWeakPtr());
- frame_->requestExecuteScriptInIsolatedWorld(world_id, &script, 1, false,
- request);
+ frame_->requestExecuteScriptInIsolatedWorld(
+ world_id, &script, 1, false, WebLocalFrame::Synchronous, request);
}
RenderFrameImpl::JavaScriptIsolatedWorldRequest::JavaScriptIsolatedWorldRequest(
@@ -3909,6 +3909,12 @@ void RenderFrameImpl::runScriptsAtDocumentReady(blink::WebLocalFrame* frame,
// Do not use |this| or |frame| here without checking |weak_self|.
}
+void RenderFrameImpl::runScriptsAtDocumentIdle(blink::WebLocalFrame* frame) {
+ DCHECK_EQ(frame_, frame);
+ GetContentClient()->renderer()->RunScriptsAtDocumentIdle(this);
+ // ContentClient might have deleted |frame| and |this| by now!
+}
+
void RenderFrameImpl::didHandleOnloadEvents(blink::WebLocalFrame* frame) {
DCHECK_EQ(frame_, frame);
if (!frame->parent()) {
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | extensions/common/feature_switch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698