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

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

Issue 2528813002: Fix Self-Referencing OOPIF Infinite Loop (Closed)
Patch Set: Add |state_| change in |WillStartRequest| and |WillRedirectRequest| Created 3 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 /* 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 283
289 if (contentDocument()) { 284 if (contentDocument()) {
290 contentDocument()->willChangeFrameOwnerProperties( 285 contentDocument()->willChangeFrameOwnerProperties(
291 m_marginWidth, marginHeight, m_scrollingMode); 286 m_marginWidth, marginHeight, m_scrollingMode);
292 } 287 }
293 m_marginHeight = marginHeight; 288 m_marginHeight = marginHeight;
294 frameOwnerPropertiesChanged(); 289 frameOwnerPropertiesChanged();
295 } 290 }
296 291
297 } // namespace blink 292 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698