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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 static bool runningUnitTest() 50 static bool runningUnitTest()
51 { 51 {
52 return Platform::current()->unitTestSupport(); 52 return Platform::current()->unitTestSupport();
53 } 53 }
54 #endif 54 #endif
55 55
56 static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat ure feature) 56 static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat ure feature)
57 { 57 {
58 UseCounter::Feature blinkFeature; 58 UseCounter::Feature blinkFeature;
59 bool deprecated = false;
59 switch (feature) { 60 switch (feature) {
60 case v8::Isolate::kUseAsm: 61 case v8::Isolate::kUseAsm:
61 blinkFeature = UseCounter::UseAsm; 62 blinkFeature = UseCounter::UseAsm;
62 break; 63 break;
63 case v8::Isolate::kBreakIterator: 64 case v8::Isolate::kBreakIterator:
64 blinkFeature = UseCounter::BreakIterator; 65 blinkFeature = UseCounter::BreakIterator;
65 break; 66 break;
66 case v8::Isolate::kLegacyConst: 67 case v8::Isolate::kLegacyConst:
67 blinkFeature = UseCounter::LegacyConst; 68 blinkFeature = UseCounter::LegacyConst;
68 break; 69 break;
69 case v8::Isolate::kObjectObserve: 70 case v8::Isolate::kObjectObserve:
70 blinkFeature = UseCounter::ObjectObserve; 71 blinkFeature = UseCounter::ObjectObserve;
72 deprecated = true;
71 break; 73 break;
72 case v8::Isolate::kSloppyMode: 74 case v8::Isolate::kSloppyMode:
73 blinkFeature = UseCounter::V8SloppyMode; 75 blinkFeature = UseCounter::V8SloppyMode;
74 break; 76 break;
75 case v8::Isolate::kStrictMode: 77 case v8::Isolate::kStrictMode:
76 blinkFeature = UseCounter::V8StrictMode; 78 blinkFeature = UseCounter::V8StrictMode;
77 break; 79 break;
78 case v8::Isolate::kStrongMode: 80 case v8::Isolate::kStrongMode:
79 blinkFeature = UseCounter::V8StrongMode; 81 blinkFeature = UseCounter::V8StrongMode;
80 break; 82 break;
81 case v8::Isolate::kRegExpPrototypeStickyGetter: 83 case v8::Isolate::kRegExpPrototypeStickyGetter:
82 blinkFeature = UseCounter::V8RegExpPrototypeStickyGetter; 84 blinkFeature = UseCounter::V8RegExpPrototypeStickyGetter;
83 break; 85 break;
84 case v8::Isolate::kRegExpPrototypeToString: 86 case v8::Isolate::kRegExpPrototypeToString:
85 blinkFeature = UseCounter::V8RegExpPrototypeToString; 87 blinkFeature = UseCounter::V8RegExpPrototypeToString;
86 break; 88 break;
87 default: 89 default:
88 // This can happen if V8 has added counters that this version of Blink 90 // This can happen if V8 has added counters that this version of Blink
89 // does not know about. It's harmless. 91 // does not know about. It's harmless.
90 return; 92 return;
91 } 93 }
92 UseCounter::count(callingExecutionContext(isolate), blinkFeature); 94 if (deprecated)
95 UseCounter::countDeprecation(callingExecutionContext(isolate), blinkFeat ure);
96 else
97 UseCounter::count(callingExecutionContext(isolate), blinkFeature);
93 } 98 }
94 99
95 V8PerIsolateData::V8PerIsolateData() 100 V8PerIsolateData::V8PerIsolateData()
96 : m_destructionPending(false) 101 : m_destructionPending(false)
97 , m_isolateHolder(adoptPtr(new gin::IsolateHolder())) 102 , m_isolateHolder(adoptPtr(new gin::IsolateHolder()))
98 , m_stringCache(adoptPtr(new StringCache(isolate()))) 103 , m_stringCache(adoptPtr(new StringCache(isolate())))
99 , m_hiddenValue(V8HiddenValue::create()) 104 , m_hiddenValue(V8HiddenValue::create())
100 , m_constructorMode(ConstructorMode::CreateNewObject) 105 , m_constructorMode(ConstructorMode::CreateNewObject)
101 , m_recursionLevel(0) 106 , m_recursionLevel(0)
102 , m_isHandlingRecursionLevelError(false) 107 , m_isHandlingRecursionLevelError(false)
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 m_endOfScopeTasks.clear(); 298 m_endOfScopeTasks.clear();
294 } 299 }
295 300
296 void V8PerIsolateData::setScriptDebugger(PassOwnPtr<MainThreadDebugger> debugger ) 301 void V8PerIsolateData::setScriptDebugger(PassOwnPtr<MainThreadDebugger> debugger )
297 { 302 {
298 ASSERT(!m_scriptDebugger); 303 ASSERT(!m_scriptDebugger);
299 m_scriptDebugger = std::move(debugger); 304 m_scriptDebugger = std::move(debugger);
300 } 305 }
301 306
302 } // namespace blink 307 } // namespace blink
OLDNEW
« 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