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

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

Issue 1973133002: ✀ Remove postMessage plumbing for swappedout:// ✀ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to use std::move instead of release(). Created 4 years, 7 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/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 341f6c3d176e69a1bce9540da035781705aadb58..4cb8d34ad5bef648a10c824e88129296a8284170 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -15,6 +15,7 @@
#include "core/frame/FrameConsole.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/Location.h"
+#include "core/frame/RemoteDOMWindow.h"
#include "core/frame/RemoteFrame.h"
#include "core/frame/Settings.h"
#include "core/frame/UseCounter.h"
@@ -220,18 +221,8 @@ void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes
UseCounter::count(frame(), UseCounter::PostMessageFromInsecureToSecure);
MessageEvent* event = MessageEvent::create(std::move(channels), message, sourceOrigin, String(), source, sourceSuborigin);
- // Give the embedder a chance to intercept this postMessage. If the
- // target is a remote frame, the message will be forwarded through the
- // browser process.
- if (frame()->client()->willCheckAndDispatchMessageEvent(target.get(), event, source->document()->frame()))
- return;
-
- // Capture stack trace only when inspector front-end is loaded as it may be time consuming.
- RefPtr<ScriptCallStack> stackTrace;
- if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument))
- stackTrace = ScriptCallStack::capture();
- blink::toLocalDOMWindow(this)->schedulePostMessage(event, target.get(), stackTrace.release());
+ schedulePostMessage(event, std::move(target), sourceDocument);
}
// FIXME: Once we're throwing exceptions for cross-origin access violations, we will always sanitize the target
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.h ('k') | third_party/WebKit/Source/core/frame/FrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698