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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/BindingSecurity.h

Issue 2881393002: Count cross-origin property access. (Closed)
Patch Set: 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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // interface. So the receiver object must be of type DOMWindow, 64 // interface. So the receiver object must be of type DOMWindow,
65 // EventTarget, or Location. 65 // EventTarget, or Location.
66 // 66 //
67 // DOMWindow 67 // DOMWindow
68 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window, 68 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window,
69 const DOMWindow* target, 69 const DOMWindow* target,
70 ExceptionState&); 70 ExceptionState&);
71 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window, 71 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window,
72 const DOMWindow* target, 72 const DOMWindow* target,
73 ErrorReportOption); 73 ErrorReportOption);
74 // EventTarget (as the parent of DOMWindow)
75 static bool ShouldAllowAccessTo(
76 const LocalDOMWindow* accessing_window,
77 const EventTarget* target,
78 ExceptionState&); // NOLINT(readability/parameter_name)
Mike West 2017/05/16 14:54:31 This turns out to be dead code. And it was confusi
79 // Location 74 // Location
80 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window, 75 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window,
81 const Location* target, 76 const Location* target,
82 ExceptionState&); 77 ExceptionState&);
83 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window, 78 static bool ShouldAllowAccessTo(const LocalDOMWindow* accessing_window,
84 const Location* target, 79 const Location* target,
85 ErrorReportOption); 80 ErrorReportOption);
86 81
87 // Check if the caller (|accessingWindow|) is allowed to access the JS 82 // Check if the caller (|accessingWindow|) is allowed to access the JS
88 // returned object (|target|), where the returned object is the JS object 83 // returned object (|target|), where the returned object is the JS object
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // 143 //
149 // This function should be only used from V8Window::namedPropertyGetterCustom. 144 // This function should be only used from V8Window::namedPropertyGetterCustom.
150 friend class V8Window; 145 friend class V8Window;
151 static bool ShouldAllowNamedAccessTo(const DOMWindow* accessing_window, 146 static bool ShouldAllowNamedAccessTo(const DOMWindow* accessing_window,
152 const DOMWindow* target_window); 147 const DOMWindow* target_window);
153 }; 148 };
154 149
155 } // namespace blink 150 } // namespace blink
156 151
157 #endif // BindingSecurity_h 152 #endif // BindingSecurity_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698