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

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/DOMWindow.h" 5 #include "core/frame/DOMWindow.h"
6 6
7 #include "bindings/core/v8/ScriptCallStack.h" 7 #include "bindings/core/v8/ScriptCallStack.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/ExceptionCode.h" 9 #include "core/dom/ExceptionCode.h"
10 #include "core/dom/ExecutionContext.h" 10 #include "core/dom/ExecutionContext.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 String sourceOrigin = (hasSuborigin && securityOrigin->suborigin()->policyCo ntains(unsafeSendOpt)) ? securityOrigin->toPhysicalOriginString() : securityOrig in->toString(); 213 String sourceOrigin = (hasSuborigin && securityOrigin->suborigin()->policyCo ntains(unsafeSendOpt)) ? securityOrigin->toPhysicalOriginString() : securityOrig in->toString();
214 String sourceSuborigin = hasSuborigin ? securityOrigin->suborigin()->name() : String(); 214 String sourceSuborigin = hasSuborigin ? securityOrigin->suborigin()->name() : String();
215 215
216 KURL targetUrl = isLocalDOMWindow() ? document()->url() : KURL(KURL(), frame ()->securityContext()->getSecurityOrigin()->toString()); 216 KURL targetUrl = isLocalDOMWindow() ? document()->url() : KURL(KURL(), frame ()->securityContext()->getSecurityOrigin()->toString());
217 if (MixedContentChecker::isMixedContent(sourceDocument->getSecurityOrigin(), targetUrl)) 217 if (MixedContentChecker::isMixedContent(sourceDocument->getSecurityOrigin(), targetUrl))
218 UseCounter::count(frame(), UseCounter::PostMessageFromSecureToInsecure); 218 UseCounter::count(frame(), UseCounter::PostMessageFromSecureToInsecure);
219 else if (MixedContentChecker::isMixedContent(frame()->securityContext()->get SecurityOrigin(), sourceDocument->url())) 219 else if (MixedContentChecker::isMixedContent(frame()->securityContext()->get SecurityOrigin(), sourceDocument->url()))
220 UseCounter::count(frame(), UseCounter::PostMessageFromInsecureToSecure); 220 UseCounter::count(frame(), UseCounter::PostMessageFromInsecureToSecure);
221 221
222 MessageEvent* event = MessageEvent::create(channels.release(), message, sour ceOrigin, String(), source, sourceSuborigin); 222 MessageEvent* event = MessageEvent::create(std::move(channels), message, sou rceOrigin, String(), source, sourceSuborigin);
223 // Give the embedder a chance to intercept this postMessage. If the 223 // Give the embedder a chance to intercept this postMessage. If the
224 // target is a remote frame, the message will be forwarded through the 224 // target is a remote frame, the message will be forwarded through the
225 // browser process. 225 // browser process.
226 if (frame()->client()->willCheckAndDispatchMessageEvent(target.get(), event, source->document()->frame())) 226 if (frame()->client()->willCheckAndDispatchMessageEvent(target.get(), event, source->document()->frame()))
227 return; 227 return;
228 228
229 // Capture stack trace only when inspector front-end is loaded as it may be time consuming. 229 // Capture stack trace only when inspector front-end is loaded as it may be time consuming.
230 RefPtr<ScriptCallStack> stackTrace; 230 RefPtr<ScriptCallStack> stackTrace;
231 if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument)) 231 if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument))
232 stackTrace = ScriptCallStack::capture(); 232 stackTrace = ScriptCallStack::capture();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */ ); 377 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */ );
378 } 378 }
379 379
380 DEFINE_TRACE(DOMWindow) 380 DEFINE_TRACE(DOMWindow)
381 { 381 {
382 visitor->trace(m_location); 382 visitor->trace(m_location);
383 EventTargetWithInlineData::trace(visitor); 383 EventTargetWithInlineData::trace(visitor);
384 } 384 }
385 385
386 } // namespace blink 386 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/File.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698