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

Side by Side Diff: Source/WebCore/bindings/v8/V8Utilities.cpp

Issue 9963061: Merge 112184 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/bindings/v8/V8Utilities.h ('k') | Source/WebCore/dom/Document.h » ('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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 if (!newValue->IsNull() && !newValue->IsUndefined()) 174 if (!newValue->IsNull() && !newValue->IsUndefined())
175 createHiddenDependency(object, newValue, cacheIndex); 175 createHiddenDependency(object, newValue, cacheIndex);
176 } 176 }
177 177
178 Frame* callingOrEnteredFrame() 178 Frame* callingOrEnteredFrame()
179 { 179 {
180 return V8BindingState::Only()->activeFrame(); 180 return V8BindingState::Only()->activeFrame();
181 } 181 }
182 182
183 bool shouldAllowNavigation(Frame* frame)
184 {
185 return V8BindingSecurity::shouldAllowNavigation(V8BindingState::Only(), fram e);
186 }
187
188 KURL completeURL(const String& relativeURL) 183 KURL completeURL(const String& relativeURL)
189 { 184 {
190 return completeURL(V8BindingState::Only(), relativeURL); 185 return completeURL(V8BindingState::Only(), relativeURL);
191 } 186 }
192 187
193 ScriptExecutionContext* getScriptExecutionContext() 188 ScriptExecutionContext* getScriptExecutionContext()
194 { 189 {
195 #if ENABLE(WORKERS) 190 #if ENABLE(WORKERS)
196 if (WorkerScriptController* controller = WorkerScriptController::controllerF orContext()) 191 if (WorkerScriptController* controller = WorkerScriptController::controllerF orContext())
197 return controller->workerContext(); 192 return controller->workerContext();
198 #endif 193 #endif
199 194
200 if (Frame* frame = V8Proxy::retrieveFrameForCurrentContext()) 195 if (Frame* frame = V8Proxy::retrieveFrameForCurrentContext())
201 return frame->document()->scriptExecutionContext(); 196 return frame->document()->scriptExecutionContext();
202 197
203 return 0; 198 return 0;
204 } 199 }
205 200
206 void throwTypeMismatchException() 201 void throwTypeMismatchException()
207 { 202 {
208 V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17"); 203 V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17");
209 } 204 }
210 205
211 } // namespace WebCore 206 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/bindings/v8/V8Utilities.h ('k') | Source/WebCore/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698