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

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

Issue 2753013003: Bindings: Remove DOMWrapperWorld::fromWorldId() for cleanup (Closed)
Patch Set: rebase 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 | « third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 622b3b96e215b9ef6d08dcc0d77120fdeaa5960b..5826cacd0a6e23ad3606c08c47422bf1ece5987b 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -754,8 +754,10 @@ void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(
WebScriptExecutionCallback* callback) {
DCHECK(frame());
+ RefPtr<DOMWrapperWorld> mainWorld = &DOMWrapperWorld::mainWorld();
SuspendableScriptExecutor* executor = SuspendableScriptExecutor::create(
- frame(), 0, createSourcesVector(&source, 1), userGesture, callback);
+ frame(), std::move(mainWorld), createSourcesVector(&source, 1),
+ userGesture, callback);
executor->run();
}
@@ -810,9 +812,11 @@ void WebLocalFrameImpl::requestExecuteScriptInIsolatedWorld(
CHECK_GT(worldID, 0);
CHECK_LT(worldID, DOMWrapperWorld::EmbedderWorldIdLimit);
+ RefPtr<DOMWrapperWorld> isolatedWorld =
+ DOMWrapperWorld::ensureIsolatedWorld(toIsolate(frame()), worldID);
SuspendableScriptExecutor* executor = SuspendableScriptExecutor::create(
- frame(), worldID, createSourcesVector(sourcesIn, numSources), userGesture,
- callback);
+ frame(), std::move(isolatedWorld),
+ createSourcesVector(sourcesIn, numSources), userGesture, callback);
switch (option) {
case AsynchronousBlockingOnload:
executor->runAsync(SuspendableScriptExecutor::OnloadBlocking);
« no previous file with comments | « third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698