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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 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/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 41c0aec7bdd91a170ede84d0af256cc7eb73a2a2..f2f8f052e3702d55870f9f50744c69e3874f5d3f 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -433,7 +433,7 @@ void LocalDOMWindow::enqueueHashchangeEvent(const String& oldURL, const String&
void LocalDOMWindow::enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObject)
{
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=36202 Popstate event needs to fire asynchronously
- dispatchEvent(PopStateEvent::create(stateObject, history()));
+ dispatchEvent(PopStateEvent::create(std::move(stateObject), history()));
}
void LocalDOMWindow::statePopped(PassRefPtr<SerializedScriptValue> stateObject)
@@ -444,7 +444,7 @@ void LocalDOMWindow::statePopped(PassRefPtr<SerializedScriptValue> stateObject)
// Per step 11 of section 6.5.9 (history traversal) of the HTML5 spec, we
// defer firing of popstate until we're in the complete state.
if (document()->isLoadCompleted())
- enqueuePopstateEvent(stateObject);
+ enqueuePopstateEvent(std::move(stateObject));
else
m_pendingStateObject = stateObject;
}
@@ -656,7 +656,7 @@ void LocalDOMWindow::schedulePostMessage(MessageEvent* event, PassRefPtr<Securit
// Allowing unbounded amounts of messages to build up for a suspended context
// is problematic; consider imposing a limit or other restriction if this
// surfaces often as a problem (see crbug.com/587012).
- PostMessageTimer* timer = new PostMessageTimer(*this, event, target, SourceLocation::capture(source), UserGestureIndicator::currentToken());
+ PostMessageTimer* timer = new PostMessageTimer(*this, event, std::move(target), SourceLocation::capture(source), UserGestureIndicator::currentToken());
timer->startOneShot(0, BLINK_FROM_HERE);
timer->suspendIfNeeded();
m_postMessageTimers.add(timer);
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmap.cpp ('k') | third_party/WebKit/Source/core/frame/RemoteDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698