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

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

Issue 1349593002: Merge 202211 "Rethrow cross-site exceptions as security errors" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2490/
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/bindings/core/v8/V8DOMWrapper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8DOMWrapper.cpp
===================================================================
--- Source/bindings/core/v8/V8DOMWrapper.cpp (revision 202325)
+++ Source/bindings/core/v8/V8DOMWrapper.cpp (working copy)
@@ -146,4 +146,15 @@
}
}
+void V8WrapperInstantiationScope::convertException()
+{
+ v8::Isolate* isolate = m_context->GetIsolate();
+ // TODO(jochen): Currently, Location is the only object for which we can reach this code path. Should be generalized.
+ ExceptionState exceptionState(ExceptionState::ConstructionContext, "Location", isolate->GetCurrentContext()->Global(), isolate);
+ LocalDOMWindow* callingWindow = callingDOMWindow(isolate);
+ DOMWindow* targetWindow = toFrameIfNotDetached(m_context)->domWindow();
+ exceptionState.throwSecurityError(targetWindow->sanitizedCrossDomainAccessErrorMessage(callingWindow), targetWindow->crossDomainAccessErrorMessage(callingWindow));
+ exceptionState.throwIfNeeded();
+}
+
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/V8DOMWrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698