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

Unified Diff: Source/modules/donottrack/NavigatorDoNotTrack.cpp

Issue 208333018: DNT should return 'null' if there is no client. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/donottrack/NavigatorDoNotTrack.cpp
diff --git a/Source/modules/donottrack/NavigatorDoNotTrack.cpp b/Source/modules/donottrack/NavigatorDoNotTrack.cpp
index 7589b3534549d2a104b9740b34afbeff972f1002..03fcebf5ac9c407be87098c349949dbbd0e53827 100644
--- a/Source/modules/donottrack/NavigatorDoNotTrack.cpp
+++ b/Source/modules/donottrack/NavigatorDoNotTrack.cpp
@@ -68,7 +68,9 @@ String NavigatorDoNotTrack::doNotTrack(Navigator& navigator)
String NavigatorDoNotTrack::doNotTrack()
{
- return frame() ? frame()->loader().client()->doNotTrackValue() : String();
+ if (!frame() || !frame()->loader().client())
+ return String();
+ return frame()->loader().client()->doNotTrackValue();
}
} // namespace WebCore
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698