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

Unified Diff: Source/bindings/v8/V8Initializer.cpp

Issue 19564003: Populate cross-origin location access SecurityError messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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: Source/bindings/v8/V8Initializer.cpp
diff --git a/Source/bindings/v8/V8Initializer.cpp b/Source/bindings/v8/V8Initializer.cpp
index cfa378a1c6bb2146d9e149f49e30386af9bda1c0..49b6bff1100304fce6921c3226ed9ddc55fb9eab 100644
--- a/Source/bindings/v8/V8Initializer.cpp
+++ b/Source/bindings/v8/V8Initializer.cpp
@@ -103,12 +103,13 @@ static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8
if (!target)
return;
DOMWindow* targetWindow = target->document()->domWindow();
- targetWindow->printErrorMessage(targetWindow->crossDomainAccessErrorMessage(activeDOMWindow()));
// Throw an exception for failed-access checks against Location objects, otherwise write to the console.
WrapperTypeInfo* typeInfo = WrapperTypeInfo::unwrap(data);
if (V8Location::info.equals(typeInfo))
- setDOMException(SecurityError, v8::Isolate::GetCurrent());
+ setDOMException(SecurityError, targetWindow->crossDomainAccessErrorMessage(activeDOMWindow()).utf8().data(), v8::Isolate::GetCurrent());
abarth-chromium 2013/07/17 18:27:59 Why utf8().data()? Can't we just pass in the stri
arv (Not doing code reviews) 2013/07/17 18:48:56 I'm fine with us changing all the exception method
+ else
+ targetWindow->printErrorMessage(targetWindow->crossDomainAccessErrorMessage(activeDOMWindow()));
}
static bool codeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context)

Powered by Google App Engine
This is Rietveld 408576698