New issue
Advanced search Search tips

Issue 746961 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

provide script state in DocumentWriteEvaluator::EnsureEvaluationContext()

Project Member Reported by maxlg@chromium.org, Jul 20 2017

Issue description

Currently DocumentWriteEvaluatorTest would fail when V8ScriptRunner::CompileScript() adds a execution context. EnsureEvaluationContext() needs adding a script state to itself to prevent that.
 

Comment 1 by maxlg@chromium.org, Jul 20 2017

Cc: panicker@chromium.org

Comment 2 by maxlg@chromium.org, Jul 20 2017

Blocking: 738495

Comment 3 by maxlg@chromium.org, Jul 20 2017

Labels: -Pri-3 Pri-1
Owner: yukishiino@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 Deleted

Comment 5 by maxlg@chromium.org, Jul 20 2017

https://chromium-review.googlesource.com/c/580401/

Here's the situation that make DocumentWriteEvaluatorTest fails. Running the webkit_unit_tests causes the failures that I will send you in Email.

By looking at the failure, it looks like it's because DocumentWriteEvaluator doesn't generate a script state, so when it tries to execute ScriptState::From(v8::context), it causes a failure. 
I am in the process of deleting the DocumentWriteEvaluator, maybe by end of week?
Cc: maxlg@chromium.org csharrison@chromium.org
maxlg@, are you okay with the deletion of DocumentWriteEvaluator?

Comment 8 by maxlg@chromium.org, Jul 25 2017

Yeah, I am OK with that. I am not using anything of DocumentWriteEvaluator.
Cc: yukishiino@chromium.org
Owner: csharrison@chromium.org
csharrison@, please assign me back if you happened to abandon your CL.  Otherwise, please remove DocumentWriteEvaluator and close this issue either of Fixed or WontFix as you like.

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7847afc23c816960a019476e995c696143365cac

commit 7847afc23c816960a019476e995c696143365cac
Author: Charles Harrison <csharrison@chromium.org>
Date: Thu Jul 27 01:15:34 2017

Remove the DocumentWriteEvaluator

This optimization speculatively evaluates script on the main thread before it would
otherwise be run. The javascript environment is sparse, with only a few globals like
"location".

The entire point of the evaluation is to see what the script will document.write, and
pass *that* back into the preload scanner. This is generally used to preload ad
script like gpt.js.

The experimental results on 5% stable were good, showing 5-7% reduction of parse time on
affected pages. However, user perceived metrics did not move as much.

Bug: 705806, 575850 , 746961 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie61499876dc883c2efa33d880cad17b7d608a53e
Reviewed-on: https://chromium-review.googlesource.com/584135
Reviewed-by: Bryan McQuade <bmcquade@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489825}
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.cc
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer_unittest.cc
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/content/child/runtime_features.cc
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/content/public/common/content_features.cc
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/content/public/common/content_features.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/testing/variations/fieldtrial_testing_config.json
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/LayoutTests/VirtualTestSuites
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_no_preload.html
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload.html
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/LayoutTests/http/tests/preload/document-write/document_write_preload_stubs.html
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/LayoutTests/virtual/documentwriteevaluator/http/tests/preload/document-write/README.txt
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/bindings/bindings.gni
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/Source/bindings/core/v8/DocumentWriteEvaluator.cpp
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/Source/bindings/core/v8/DocumentWriteEvaluator.h
[delete] https://crrev.com/b6ad4300969ae4b8a6d2991c3869c6aa56c8a1af/third_party/WebKit/Source/bindings/core/v8/DocumentWriteEvaluatorTest.cpp
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerFuzzer.cpp
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/third_party/WebKit/public/platform/WebRuntimeFeatures.h
[modify] https://crrev.com/7847afc23c816960a019476e995c696143365cac/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Assigned)
Blocking: -738495

Sign in to add a comment