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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp

Issue 2528813002: Fix Self-Referencing OOPIF Infinite Loop (Closed)
Patch Set: refactor allowedToLoadFrame conditional Created 3 years, 10 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // containing document as the caller context. 64 // containing document as the caller context.
65 v8::Isolate* isolate = toIsolate(&document()); 65 v8::Isolate* isolate = toIsolate(&document());
66 LocalDOMWindow* accessingWindow = isolate->InContext() 66 LocalDOMWindow* accessingWindow = isolate->InContext()
67 ? currentDOMWindow(isolate) 67 ? currentDOMWindow(isolate)
68 : document().domWindow(); 68 : document().domWindow();
69 if (!BindingSecurity::shouldAllowAccessToFrame( 69 if (!BindingSecurity::shouldAllowAccessToFrame(
70 accessingWindow, contentFrame(), 70 accessingWindow, contentFrame(),
71 BindingSecurity::ErrorReportOption::Report)) 71 BindingSecurity::ErrorReportOption::Report))
72 return false; 72 return false;
73 } 73 }
74
75 LocalFrame* parentFrame = document().frame();
76 if (parentFrame)
77 return parentFrame->isURLAllowed(completeURL);
78
79 return true; 74 return true;
80 } 75 }
81 76
82 void HTMLFrameElementBase::openURL(bool replaceCurrentItem) { 77 void HTMLFrameElementBase::openURL(bool replaceCurrentItem) {
83 if (!isURLAllowed()) 78 if (!isURLAllowed())
84 return; 79 return;
85 80
86 if (m_URL.isEmpty()) 81 if (m_URL.isEmpty())
87 m_URL = AtomicString(blankURL().getString()); 82 m_URL = AtomicString(blankURL().getString());
88 83
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 284
290 if (contentDocument()) { 285 if (contentDocument()) {
291 contentDocument()->willChangeFrameOwnerProperties( 286 contentDocument()->willChangeFrameOwnerProperties(
292 m_marginWidth, marginHeight, m_scrollingMode); 287 m_marginWidth, marginHeight, m_scrollingMode);
293 } 288 }
294 m_marginHeight = marginHeight; 289 m_marginHeight = marginHeight;
295 frameOwnerPropertiesChanged(); 290 frameOwnerPropertiesChanged();
296 } 291 }
297 292
298 } // namespace blink 293 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698