commit | d5d0b245c0c1765f92c57814d4956b3c52ab8931 | [log] [tgz] |
---|---|---|
author | Hiroshige Hayashizaki <hiroshige@chromium.org> | Mon Nov 27 06:34:20 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Nov 27 06:34:20 2017 |
tree | fc537c048fe4554b27ea78eda385220964ec9de9 | |
parent | 978652cd6242315acc5f0eceb58c22a706669149 [diff] |
Do not report the error inside ScriptModule::Evaluate() Instead of reporting the error inside ScriptModule::Evaluate(), this CL makes ScriptModule::Evaluate() always return the exception without reporting (i.e. the same as the kCapture behavior), and makes ModulatorImplBase::ExecuteModule() handle and rethrow that returned exception. This is to - Determine whether ScriptModule::Evaluate() succeeded or not. After this CL, evaluation succeeds iff |!Evaluate().IsEmpty()|. This is preparation for https://chromium-review.googlesource.com/698467, because methods such as IsErrored() will be removed and thus an explicit way to check an evaluation error will be needed. - Remove duplicated "report the error" code paths around Modulator::ExecuteModule(): - One implemented by v8::TryCatch::SetVerbose(true) inside ScriptModule::Evaluate(), that is removed by this CL, and - One implemented by a ScriptModule::ReportException() call in ModulatorImplBase::ExecuteModule(). This CL doesn't change non-test behavior, because - ScriptModule::Evaluate() is called with kCapture from all non-test code except for ModulatorImplBase::ExecuteModule(), and - ModulatorImplBase::ExecuteModule() handles the error returned from Evaluate() and report it if |capture_error| is |kReport|. Clean up: this CL - Removes CaptureEvalErrorFlag argument from ScriptModule::Evaluate(). - Moves CaptureEvalErrorFlag to Modulator. - Removes Modulator::ExecuteModule()'s CaptureEvalErrorFlag argument's default value to make the flag value explicit. Bug: 763597 Change-Id: I31580b1c6b254b5d6b94e037dfa837ba5ae595fb Reviewed-on: https://chromium-review.googlesource.com/754333 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#519229}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .