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

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

Issue 1579573002: Count feature usage for the current context instead of the calling one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 break; 85 break;
86 case v8::Isolate::kRegExpPrototypeToString: 86 case v8::Isolate::kRegExpPrototypeToString:
87 blinkFeature = UseCounter::V8RegExpPrototypeToString; 87 blinkFeature = UseCounter::V8RegExpPrototypeToString;
88 break; 88 break;
89 default: 89 default:
90 // 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
91 // does not know about. It's harmless. 91 // does not know about. It's harmless.
92 return; 92 return;
93 } 93 }
94 if (deprecated) 94 if (deprecated)
95 UseCounter::countDeprecation(callingExecutionContext(isolate), blinkFeat ure); 95 UseCounter::countDeprecation(currentExecutionContext(isolate), blinkFeat ure);
96 else 96 else
97 UseCounter::count(callingExecutionContext(isolate), blinkFeature); 97 UseCounter::count(currentExecutionContext(isolate), blinkFeature);
98 } 98 }
99 99
100 V8PerIsolateData::V8PerIsolateData() 100 V8PerIsolateData::V8PerIsolateData()
101 : m_destructionPending(false) 101 : m_destructionPending(false)
102 , m_isolateHolder(adoptPtr(new gin::IsolateHolder())) 102 , m_isolateHolder(adoptPtr(new gin::IsolateHolder()))
103 , m_stringCache(adoptPtr(new StringCache(isolate()))) 103 , m_stringCache(adoptPtr(new StringCache(isolate())))
104 , m_hiddenValue(V8HiddenValue::create()) 104 , m_hiddenValue(V8HiddenValue::create())
105 , m_constructorMode(ConstructorMode::CreateNewObject) 105 , m_constructorMode(ConstructorMode::CreateNewObject)
106 , m_recursionLevel(0) 106 , m_recursionLevel(0)
107 , m_isHandlingRecursionLevelError(false) 107 , m_isHandlingRecursionLevelError(false)
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 m_endOfScopeTasks.clear(); 298 m_endOfScopeTasks.clear();
299 } 299 }
300 300
301 void V8PerIsolateData::setScriptDebugger(PassOwnPtr<MainThreadDebugger> debugger ) 301 void V8PerIsolateData::setScriptDebugger(PassOwnPtr<MainThreadDebugger> debugger )
302 { 302 {
303 ASSERT(!m_scriptDebugger); 303 ASSERT(!m_scriptDebugger);
304 m_scriptDebugger = std::move(debugger); 304 m_scriptDebugger = std::move(debugger);
305 } 305 }
306 306
307 } // namespace blink 307 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698