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

Unified Diff: Source/modules/fetch/Request.cpp

Issue 1287273002: [Fetch] Add a deprecation warning for Request.context (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tests. Created 5 years, 4 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 | « LayoutTests/http/tests/fetch/chromium/error-messages-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/fetch/Request.cpp
diff --git a/Source/modules/fetch/Request.cpp b/Source/modules/fetch/Request.cpp
index d0264b2d262275260b489057fd7e8f43c796760b..2c582f4acf5c615196b379f5fbb4344792cf1863 100644
--- a/Source/modules/fetch/Request.cpp
+++ b/Source/modules/fetch/Request.cpp
@@ -10,6 +10,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/fetch/FetchUtils.h"
#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/inspector/ConsoleMessage.h"
#include "core/loader/ThreadableLoader.h"
#include "modules/fetch/BodyStreamBuffer.h"
#include "modules/fetch/FetchBlobDataConsumerHandle.h"
@@ -341,6 +342,8 @@ KURL Request::url() const
String Request::context() const
{
+ executionContext()->addConsoleMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, "Request.context is deprecated and will be removed in M46."));
falken 2015/08/13 11:37:19 Deprecation messages are usually added to UseCount
hiroshige 2015/08/13 11:39:10 Hmm, so we should add a new use counter and corres
falken 2015/08/13 11:45:11 I think that's the convention, that's what I did f
hiroshige 2015/08/13 12:01:23 Done.
+
// "The context attribute's getter must return request's context"
switch (m_request->context()) {
case WebURLRequest::RequestContextUnspecified:
« no previous file with comments | « LayoutTests/http/tests/fetch/chromium/error-messages-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698