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

Side by Side Diff: Source/bindings/v8/BindingSecurity.cpp

Issue 219903002: Revert 170347 "Convert HTMLFrameOwnerElement and FocusController..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1917/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/BindingSecurity.h ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return true; 73 return true;
74 74
75 if (reportingOption == ReportSecurityError && targetDocument->domWindow()) { 75 if (reportingOption == ReportSecurityError && targetDocument->domWindow()) {
76 if (LocalFrame* frame = targetDocument->frame()) 76 if (LocalFrame* frame = targetDocument->frame())
77 frame->domWindow()->printErrorMessage(targetDocument->domWindow()->c rossDomainAccessErrorMessage(callingWindow)); 77 frame->domWindow()->printErrorMessage(targetDocument->domWindow()->c rossDomainAccessErrorMessage(callingWindow));
78 } 78 }
79 79
80 return false; 80 return false;
81 } 81 }
82 82
83 bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, Frame* targ et, SecurityReportingOption reportingOption) 83 bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, LocalFrame* target, SecurityReportingOption reportingOption)
84 { 84 {
85 if (!target || !target->isLocalFrame()) 85 return target && canAccessDocument(isolate, target->document(), reportingOpt ion);
86 return false;
87 return canAccessDocument(isolate, toLocalFrame(target)->document(), reportin gOption);
88 } 86 }
89 87
90 bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, Frame* targ et, ExceptionState& exceptionState) 88 bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, LocalFrame* target, ExceptionState& exceptionState)
91 { 89 {
92 if (!target || !target->isLocalFrame()) 90 return target && canAccessDocument(isolate, target->document(), exceptionSta te);
93 return false;
94 return canAccessDocument(isolate, toLocalFrame(target)->document(), exceptio nState);
95 } 91 }
96 92
97 bool BindingSecurity::shouldAllowAccessToNode(v8::Isolate* isolate, Node* target , ExceptionState& exceptionState) 93 bool BindingSecurity::shouldAllowAccessToNode(v8::Isolate* isolate, Node* target , ExceptionState& exceptionState)
98 { 94 {
99 return target && canAccessDocument(isolate, &target->document(), exceptionSt ate); 95 return target && canAccessDocument(isolate, &target->document(), exceptionSt ate);
100 } 96 }
101 97
102 } 98 }
OLDNEW
« no previous file with comments | « Source/bindings/v8/BindingSecurity.h ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698