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

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

Issue 2881393002: Count cross-origin property access. (Closed)
Patch Set: Nits + Rebase. Created 3 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 /* 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 target_frame = &GetFrame()->Tree().Top(); 1651 target_frame = &GetFrame()->Tree().Top();
1652 } else if (EqualIgnoringASCIICase(frame_name, "_parent")) { 1652 } else if (EqualIgnoringASCIICase(frame_name, "_parent")) {
1653 if (Frame* parent = GetFrame()->Tree().Parent()) 1653 if (Frame* parent = GetFrame()->Tree().Parent())
1654 target_frame = parent; 1654 target_frame = parent;
1655 else 1655 else
1656 target_frame = GetFrame(); 1656 target_frame = GetFrame();
1657 } 1657 }
1658 1658
1659 if (target_frame) { 1659 if (target_frame) {
1660 if (!active_document->GetFrame() || 1660 if (!active_document->GetFrame() ||
1661 !active_document->GetFrame()->CanNavigate(*target_frame)) 1661 !active_document->GetFrame()->CanNavigate(*target_frame)) {
1662 return nullptr; 1662 return nullptr;
1663 }
1663 1664
1664 KURL completed_url = first_frame->GetDocument()->CompleteURL(url_string); 1665 KURL completed_url = first_frame->GetDocument()->CompleteURL(url_string);
1665 1666
1666 if (target_frame->DomWindow()->IsInsecureScriptAccess(*calling_window, 1667 if (target_frame->DomWindow()->IsInsecureScriptAccess(*calling_window,
1667 completed_url)) 1668 completed_url))
1668 return target_frame->DomWindow(); 1669 return target_frame->DomWindow();
1669 1670
1670 if (url_string.IsEmpty()) 1671 if (url_string.IsEmpty())
1671 return target_frame->DomWindow(); 1672 return target_frame->DomWindow();
1672 1673
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 DOMWindow::Trace(visitor); 1705 DOMWindow::Trace(visitor);
1705 Supplementable<LocalDOMWindow>::Trace(visitor); 1706 Supplementable<LocalDOMWindow>::Trace(visitor);
1706 } 1707 }
1707 1708
1708 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1709 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1709 visitor->TraceWrappers(custom_elements_); 1710 visitor->TraceWrappers(custom_elements_);
1710 DOMWindow::TraceWrappers(visitor); 1711 DOMWindow::TraceWrappers(visitor);
1711 } 1712 }
1712 1713
1713 } // namespace blink 1714 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/BindingSecurityTest.cpp ('k') | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698