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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp

Issue 2723973002: Make V8Binding helpers return LocalFrame/LocalDOMWindow as appropriate (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp b/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
index e54c2acf6f2f81002f2fe5dd3640bf024dbe2a32..ae25c6ca399229d4d03bdfe009b7d82bf74c23ae 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.cpp
@@ -110,11 +110,11 @@ void V8WrapperInstantiationScope::securityCheck(
return;
// If the context is different, we need to make sure that the current
// context has access to the creation context.
- Frame* frame = toFrameIfNotDetached(contextForWrapper);
+ LocalFrame* frame = toLocalFrameIfNotDetached(contextForWrapper);
if (!frame) {
// Sandbox detached frames - they can't create cross origin objects.
LocalDOMWindow* callingWindow = currentDOMWindow(isolate);
- DOMWindow* targetWindow = toDOMWindow(contextForWrapper);
+ LocalDOMWindow* targetWindow = toLocalDOMWindow(contextForWrapper);
// TODO(jochen): Currently, Location is the only object for which we can
// reach this code path. Should be generalized.
ExceptionState exceptionState(isolate, ExceptionState::ConstructionContext,
@@ -147,7 +147,7 @@ void V8WrapperInstantiationScope::convertException() {
ExceptionState exceptionState(isolate, ExceptionState::ConstructionContext,
"Location");
LocalDOMWindow* callingWindow = currentDOMWindow(isolate);
- DOMWindow* targetWindow = toDOMWindow(m_context);
+ LocalDOMWindow* targetWindow = toLocalDOMWindow(m_context);
exceptionState.throwSecurityError(
targetWindow->sanitizedCrossDomainAccessErrorMessage(callingWindow),
targetWindow->crossDomainAccessErrorMessage(callingWindow));

Powered by Google App Engine
This is Rietveld 408576698