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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp

Issue 1566173003: Mark Object.observe as deprecated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged to ToT Created 4 years, 11 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 | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
index 50e98e4a7ca93b76a6b06286d1dc1c4fb076e520..055380e739d8c762fe8d7f81f764ac74b80c2cbe 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
@@ -56,6 +56,7 @@ static bool runningUnitTest()
static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeature feature)
{
UseCounter::Feature blinkFeature;
+ bool deprecated = false;
switch (feature) {
case v8::Isolate::kUseAsm:
blinkFeature = UseCounter::UseAsm;
@@ -68,6 +69,7 @@ static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat
break;
case v8::Isolate::kObjectObserve:
blinkFeature = UseCounter::ObjectObserve;
+ deprecated = true;
break;
case v8::Isolate::kSloppyMode:
blinkFeature = UseCounter::V8SloppyMode;
@@ -89,7 +91,10 @@ static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat
// does not know about. It's harmless.
return;
}
- UseCounter::count(callingExecutionContext(isolate), blinkFeature);
+ if (deprecated)
+ UseCounter::countDeprecation(callingExecutionContext(isolate), blinkFeature);
+ else
+ UseCounter::count(callingExecutionContext(isolate), blinkFeature);
}
V8PerIsolateData::V8PerIsolateData()
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698