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

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

Issue 2502783004: Don't skip security checks for javascript: URLs when the JS stack is empty. (Closed)
Patch Set: Added comment. Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptController.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) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Returns true if the current world is isolated, and has its own Content 117 // Returns true if the current world is isolated, and has its own Content
118 // Security Policy. In this case, the policy of the main world should be 118 // Security Policy. In this case, the policy of the main world should be
119 // ignored when evaluating resources injected into the DOM. 119 // ignored when evaluating resources injected into the DOM.
120 bool shouldBypassMainWorldCSP(); 120 bool shouldBypassMainWorldCSP();
121 121
122 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); 122 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*);
123 123
124 void enableEval(); 124 void enableEval();
125 void disableEval(const String& errorMessage); 125 void disableEval(const String& errorMessage);
126 126
127 static bool canAccessFromCurrentOrigin(v8::Isolate*, Frame*);
128
129 void collectIsolatedContexts( 127 void collectIsolatedContexts(
130 Vector<std::pair<ScriptState*, SecurityOrigin*>>&); 128 Vector<std::pair<ScriptState*, SecurityOrigin*>>&);
131 129
132 bool canExecuteScripts(ReasonForCallingCanExecuteScripts); 130 bool canExecuteScripts(ReasonForCallingCanExecuteScripts);
133 131
134 TextPosition eventHandlerPosition() const; 132 TextPosition eventHandlerPosition() const;
135 133
136 void clearWindowProxy(); 134 void clearWindowProxy();
137 void updateDocument(); 135 void updateDocument();
138 136
(...skipping 26 matching lines...) Expand all
165 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, 163 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&,
166 AccessControlStatus, 164 AccessControlStatus,
167 ExecuteScriptPolicy); 165 ExecuteScriptPolicy);
168 166
169 Member<WindowProxyManager> m_windowProxyManager; 167 Member<WindowProxyManager> m_windowProxyManager;
170 }; 168 };
171 169
172 } // namespace blink 170 } // namespace blink
173 171
174 #endif // ScriptController_h 172 #endif // ScriptController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698