Bug 1376634 - Fix telemetry reports to report cacheable scripts instead of only small scripts. r=mrbkap
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Thu, 29 Jun 2017 00:48:55 +0000
changeset 417782 f83e1c86a428c6965285cbe80bc5b011a4d70f68
parent 417781 119f62fd31af3477b8dd6ceb9ab2e29b4e022f83
child 417783 5283088aa3be7081cd26fdda0a1c006e67088f40
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1376634
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1376634 - Fix telemetry reports to report cacheable scripts instead of only small scripts. r=mrbkap
dom/script/ScriptLoader.cpp
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -2156,17 +2156,17 @@ ScriptLoader::EvaluateScript(ScriptLoadR
         } else {
           MOZ_ASSERT(aRequest->IsSource());
           JS::Rooted<JSScript*> script(aes.cx());
           bool encodeBytecode = ShouldCacheBytecode(aRequest);
 
           TimeStamp start;
           if (Telemetry::CanRecordExtended()) {
             // Only record telemetry for scripts which are above the threshold.
-            if (aRequest->mCacheInfo && aRequest->mScriptText.length() < 1024) {
+            if (aRequest->mCacheInfo && aRequest->mScriptText.length() >= 1024) {
               start = TimeStamp::Now();
             }
           }
 
           {
             nsJSUtils::ExecutionContext exec(aes.cx(), global);
             exec.SetEncodeBytecode(encodeBytecode);
             TRACE_FOR_TEST(aRequest->mElement, "scriptloader_execute");