Chromium Code Reviews| 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 aad31716786f96c5a49adbea8bb9c4b5932a7395..86f2a58cdd13d15cae46cec45c18279a660a36d9 100644 |
| --- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
| +++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
| @@ -625,9 +625,10 @@ void LocalDOMWindow::schedulePostMessage(MessageEvent* event, |
| // 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, std::move(target), SourceLocation::capture(source), |
| - UserGestureIndicator::currentToken()); |
| + std::unique_ptr<SourceLocation> location = SourceLocation::capture(source); |
|
sof
2016/11/29 09:15:44
Subtle staging of allocations going on here wrt 'n
Michael Lippautz
2016/11/29 09:51:41
Sorry, for not leaving a comment. The rationale is
|
| + PostMessageTimer* timer = |
| + new PostMessageTimer(*this, event, std::move(target), std::move(location), |
| + UserGestureIndicator::currentToken()); |
| timer->startOneShot(0, BLINK_FROM_HERE); |
| timer->suspendIfNeeded(); |
| m_postMessageTimers.add(timer); |