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

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

Issue 1601283003: DevTools: deoilpanize inspector/v8 and related classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed. Created 4 years, 11 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/ScriptCallStackFactory.h" 7 #include "bindings/core/v8/ScriptCallStackFactory.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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 else if (MixedContentChecker::isMixedContent(frame()->securityContext()->sec urityOrigin(), sourceDocument->url())) 211 else if (MixedContentChecker::isMixedContent(frame()->securityContext()->sec urityOrigin(), sourceDocument->url()))
212 UseCounter::count(frame(), UseCounter::PostMessageFromInsecureToSecure); 212 UseCounter::count(frame(), UseCounter::PostMessageFromInsecureToSecure);
213 213
214 // Give the embedder a chance to intercept this postMessage. If the 214 // Give the embedder a chance to intercept this postMessage. If the
215 // target is a remote frame, the message will be forwarded through the 215 // target is a remote frame, the message will be forwarded through the
216 // browser process. 216 // browser process.
217 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(channels.relea se(), message, sourceOrigin, String(), source, sourceSuborigin); 217 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(channels.relea se(), message, sourceOrigin, String(), source, sourceSuborigin);
218 bool didHandleMessageEvent = frame()->client()->willCheckAndDispatchMessageE vent(target.get(), event.get(), source->document()->frame()); 218 bool didHandleMessageEvent = frame()->client()->willCheckAndDispatchMessageE vent(target.get(), event.get(), source->document()->frame());
219 if (!didHandleMessageEvent) { 219 if (!didHandleMessageEvent) {
220 // Capture stack trace only when inspector front-end is loaded as it may be time consuming. 220 // Capture stack trace only when inspector front-end is loaded as it may be time consuming.
221 RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = nullptr; 221 RefPtr<ScriptCallStack> stackTrace;
222 if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument)) 222 if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument))
223 stackTrace = currentScriptCallStack(ScriptCallStack::maxCallStackSiz eToCapture); 223 stackTrace = currentScriptCallStack(ScriptCallStack::maxCallStackSiz eToCapture);
224 224
225 toLocalDOMWindow(this)->schedulePostMessage(event, source, target.get(), stackTrace.release()); 225 toLocalDOMWindow(this)->schedulePostMessage(event, source, target.get(), stackTrace.release());
226 } 226 }
227 } 227 }
228 228
229 // FIXME: Once we're throwing exceptions for cross-origin access violations, we will always sanitize the target 229 // FIXME: Once we're throwing exceptions for cross-origin access violations, we will always sanitize the target
230 // frame details, so we can safely combine 'crossDomainAccessErrorMessage' with this method after considering 230 // frame details, so we can safely combine 'crossDomainAccessErrorMessage' with this method after considering
231 // exactly which details may be exposed to JavaScript. 231 // exactly which details may be exposed to JavaScript.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */ ); 368 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */ );
369 } 369 }
370 370
371 DEFINE_TRACE(DOMWindow) 371 DEFINE_TRACE(DOMWindow)
372 { 372 {
373 visitor->trace(m_location); 373 visitor->trace(m_location);
374 EventTargetWithInlineData::trace(visitor); 374 EventTargetWithInlineData::trace(visitor);
375 } 375 }
376 376
377 } // namespace blink 377 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/ConsoleBase.cpp ('k') | third_party/WebKit/Source/core/frame/FrameConsole.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698