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

Unified Diff: third_party/WebKit/Source/core/page/CreateWindow.cpp

Issue 2798593002: Count how often we'd throw for invalid URLs in window.open (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/CreateWindow.cpp
diff --git a/third_party/WebKit/Source/core/page/CreateWindow.cpp b/third_party/WebKit/Source/core/page/CreateWindow.cpp
index f404b43ec4965b8fffcf1e6ce94c5d3f7100828c..203dcd3d2b99be096ed7920228708e63c9e285bc 100644
--- a/third_party/WebKit/Source/core/page/CreateWindow.cpp
+++ b/third_party/WebKit/Source/core/page/CreateWindow.cpp
@@ -186,6 +186,7 @@ DOMWindow* createWindow(const String& urlString,
? KURL(ParsedURLString, emptyString)
: firstFrame.document()->completeURL(urlString);
if (!completedURL.isEmpty() && !completedURL.isValid()) {
+ UseCounter::count(activeFrame, UseCounter::WindowOpenWithInvalidURL);
// Don't expose client code to invalid URLs.
callingWindow.printErrorMessage(
"Unable to open a window with invalid URL '" +
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698