+2007-11-10 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Sam Weinig
+
+ Rest of fix for 5394877
+
+ * bindings/js/kjs_window.cpp:
+ (KJS::Window::isSafeScript):
+ Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in
+ private browsing mode either.
+
2007-11-10 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Oliver.
if (actSecurityOrigin.canAccess(thisSecurityOrigin))
return true;
- // FIXME: this error message should contain more specifics of why the same origin check has failed.
- String message = String::format("Unsafe JavaScript attempt to access frame with URL %s from frame with URL %s. Domains, protocols and ports must match.\n",
- thisDocument->URL().utf8().data(), actDocument->URL().utf8().data());
-
- if (Interpreter::shouldPrintExceptions())
- printf("%s", message.utf8().data());
-
- if (Page* page = frame->page())
- page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, 1, String());
+ if (!frame->settings()->privateBrowsingEnabled()) {
+ // FIXME: this error message should contain more specifics of why the same origin check has failed.
+ String message = String::format("Unsafe JavaScript attempt to access frame with URL %s from frame with URL %s. Domains, protocols and ports must match.\n",
+ thisDocument->URL().utf8().data(), actDocument->URL().utf8().data());
+
+ if (Interpreter::shouldPrintExceptions())
+ printf("%s", message.utf8().data());
+
+ if (Page* page = frame->page())
+ page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, 1, String());
+ }
return false;
}