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

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

Issue 2133743002: Removes crash keys for crbug.com/621730 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "core/page/CreateWindow.h" 72 #include "core/page/CreateWindow.h"
73 #include "core/page/Page.h" 73 #include "core/page/Page.h"
74 #include "core/page/WindowFeatures.h" 74 #include "core/page/WindowFeatures.h"
75 #include "core/page/scrolling/ScrollingCoordinator.h" 75 #include "core/page/scrolling/ScrollingCoordinator.h"
76 #include "platform/EventDispatchForbiddenScope.h" 76 #include "platform/EventDispatchForbiddenScope.h"
77 #include "platform/weborigin/SecurityOrigin.h" 77 #include "platform/weborigin/SecurityOrigin.h"
78 #include "platform/weborigin/Suborigin.h" 78 #include "platform/weborigin/Suborigin.h"
79 #include "public/platform/Platform.h" 79 #include "public/platform/Platform.h"
80 #include "public/platform/WebFrameScheduler.h" 80 #include "public/platform/WebFrameScheduler.h"
81 #include "public/platform/WebScreenInfo.h" 81 #include "public/platform/WebScreenInfo.h"
82 #include "wtf/debug/CrashLogging.h"
83 #include <memory> 82 #include <memory>
84 83
85 namespace blink { 84 namespace blink {
86 85
87 // Rather than simply inheriting LocalFrameLifecycleObserver like most other 86 // Rather than simply inheriting LocalFrameLifecycleObserver like most other
88 // classes, LocalDOMWindow hides its LocalFrameLifecycleObserver with 87 // classes, LocalDOMWindow hides its LocalFrameLifecycleObserver with
89 // composition. This prevents conflicting overloads between DOMWindow, which 88 // composition. This prevents conflicting overloads between DOMWindow, which
90 // has a frame() accessor that returns Frame* for bindings code, and 89 // has a frame() accessor that returns Frame* for bindings code, and
91 // LocalFrameLifecycleObserver, which has a frame() accessor that returns a 90 // LocalFrameLifecycleObserver, which has a frame() accessor that returns a
92 // LocalFrame*. 91 // LocalFrame*.
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 { 680 {
682 if (!isCurrentlyDisplayedInFrame()) 681 if (!isCurrentlyDisplayedInFrame())
683 return; 682 return;
684 683
685 MessageEvent* event = timer->event(); 684 MessageEvent* event = timer->event();
686 685
687 UserGestureIndicator gestureIndicator(timer->userGestureToken()); 686 UserGestureIndicator gestureIndicator(timer->userGestureToken());
688 687
689 event->entangleMessagePorts(document()); 688 event->entangleMessagePorts(document());
690 689
691 // Temporary instrumentation for http://crbug.com/621730.
692 WTF::debug::ScopedCrashKey("postmessage_src_origin", event->origin().utf8(). data());
693 WTF::debug::ScopedCrashKey("postmessage_dst_origin", document()->getSecurity Origin()->toRawString().utf8().data());
694 WTF::debug::ScopedCrashKey("postmessage_dst_url", document()->url().getStrin g().utf8().data());
695
696 dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->tak eLocation()); 690 dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->tak eLocation());
697 } 691 }
698 692
699 void LocalDOMWindow::removePostMessageTimer(PostMessageTimer* timer) 693 void LocalDOMWindow::removePostMessageTimer(PostMessageTimer* timer)
700 { 694 {
701 m_postMessageTimers.remove(timer); 695 m_postMessageTimers.remove(timer);
702 } 696 }
703 697
704 void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende dTargetOrigin, Event* event, std::unique_ptr<SourceLocation> location) 698 void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende dTargetOrigin, Event* event, std::unique_ptr<SourceLocation> location)
705 { 699 {
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 { 1550 {
1557 // If the LocalDOMWindow still has a frame reference, that frame must point 1551 // If the LocalDOMWindow still has a frame reference, that frame must point
1558 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1552 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1559 // where script execution leaks between different LocalDOMWindows. 1553 // where script execution leaks between different LocalDOMWindows.
1560 if (m_frameObserver->frame()) 1554 if (m_frameObserver->frame())
1561 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1555 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1562 return m_frameObserver->frame(); 1556 return m_frameObserver->frame();
1563 } 1557 }
1564 1558
1565 } // namespace blink 1559 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8EventListener.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698