Add counter to track Date::getTimezoneOffset().

Bug: chromium:915620
Change-Id: I75579080098632639b125b2252b3ab9615c7ea95
Reviewed-on: https://chromium-review.googlesource.com/c/1379876
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58306}
This commit is contained in:
Mike West 2018-12-17 13:29:49 +01:00 committed by Commit Bot
parent e1207c94f7
commit 14ebea15a4
2 changed files with 2 additions and 0 deletions

View File

@ -7427,6 +7427,7 @@ class V8_EXPORT Isolate {
kOptimizedFunctionWithOneShotBytecode = 71,
kRegExpMatchIsTrueishOnNonJSRegExp = 72,
kRegExpMatchIsFalseishOnJSRegExp = 73,
kDateGetTimezoneOffset = 74,
// If you add new values here, you'll also need to update Chromium's:
// web_feature.mojom, UseCounterCallback.cpp, and enums.xml. V8 changes to

View File

@ -18677,6 +18677,7 @@ Object* JSDate::GetUTCField(FieldIndex index,
int64_t time_ms = static_cast<int64_t>(value);
if (index == kTimezoneOffset) {
GetIsolate()->CountUsage(v8::Isolate::kDateGetTimezoneOffset);
return Smi::FromInt(date_cache->TimezoneOffset(time_ms));
}