New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 673950 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Regression



Sign in to add a comment

DevTools: liveEdit is broken

Project Member Reported by kozyatinskiy@chromium.org, Dec 14 2016

Issue description

Chrome Version: 312059d83c311964f70a83d068990b2fc076bde4
V8 Version: c22c70b6053eb305d537831fc309296a1c888988
OS: all

I'm not able to reproduce it with simple repro. It's probably related to event listeners, classes and some V8 optimizations.

What steps will reproduce the problem?
(1) run chromium
(2) open DevTools
(3) undock DevTools from main menu
(4) open console tab
(4) open DevTools on DevTools by clicking Ctrl + I on Linux
(5) open devtools/bundled/console/console_module.js in Sources panel
(6) replace
"_onConsoleMessageUpdated(event){var message=(event.data);var viewMessage=message[this._viewMessageSymbol];if(viewMessage){viewMessage.updateMessageElement();"
with
"_onConsoleMessageUpdated(event){var message=(event.data);var viewMessage=message[this._viewMessageSymbol];if(viewMessage){console.log('!');viewMessage.updateMessageElement();"
(7) press Ctrl+S to save changes
(8) console in current DevTools will contain LiveEdit error:
"LiveEdit failed: Uncaught TypeError: Cannot read property 'info' of undefined"
(9) on click in console in first DevTools errors like following will be generated:
"Uncaught SyntaxError: Unexpected identifier"

What is the expected result?
LiveEdit works.

What happens instead?
"LiveEdit failed: Uncaught TypeError: Cannot read property 'info' of undefined"
 
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/3dea2c83541af5c0f65044c4224f15d919254a4c

commit 3dea2c83541af5c0f65044c4224f15d919254a4c
Author: kozyatinskiy <kozyatinskiy@chromium.org>
Date: Wed Dec 14 02:04:10 2016

Revert of Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (patchset #11 id:190001 of https://codereview.chromium.org/2547483002/ )

Reason for revert:
LiveEdit is broken in some cases.

Original issue's description:
> Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID
>
> Now that SharedFunctionInfos have a unique ID (and the IDs are dense),
> we can use them as an index into an array, instead of using a
> WeakFixedArray where we have to do a linear scan.
>
> Hooking up liveedit is a bit more involved, see
> https://docs.google.com/presentation/d/1FtNa3U7WsF5bPhY9uGoJG5Y9hnz5VBDabfOWpb4unWI/edit
> for an overview
>
> BUG= v8:5589 
> R=verwaest@chromium.org,jgruber@chromium.org
>
> Committed: https://crrev.com/6595e7405769dc9d49e9568d61485efc6d468baf
> Cr-Commit-Position: refs/heads/master@{#41600}

TBR=jgruber@chromium.org,verwaest@chromium.org,yangguo@chromium.org,jochen@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= v8:5589 , chromium:673950 
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2578433002
Cr-Commit-Position: refs/heads/master@{#41684}

[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/bootstrapper.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/compiler.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/crankshaft/hydrogen.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/debug/debug.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/debug/liveedit.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/debug/liveedit.h
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/debug/liveedit.js
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/factory.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/heap/heap.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/heap/object-stats.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/js/promise.js
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/objects-inl.h
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/objects.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/objects.h
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/parsing/parse-info.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/parsing/parse-info.h
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/parsing/parser.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/runtime/runtime-function.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/runtime/runtime-liveedit.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/src/runtime/runtime.h
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/test/cctest/heap/test-heap.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/test/cctest/parsing/test-parse-decision.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/test/cctest/test-serialize.cc
[modify] https://crrev.com/3dea2c83541af5c0f65044c4224f15d919254a4c/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc

Comment 3 by jochen@chromium.org, Dec 15 2016

hum, I wonder whether a bug without a revert would have been sufficient here? after all, this case isn't covered by tests, and the revert ripped out a large part of infrastructure...
We actively use live edit during DevTools front end development and this issue broke our process.
Will git cl format help infrastructure next time? Do I need to think about something else in infrastructure in addition to green bots?

Comment 5 by jochen@chromium.org, Dec 15 2016

not sure what you mean with git cl format?

if it's development, you can revert locally (and you can still add tests for features you rely on)

Comment 6 by jochen@chromium.org, Dec 15 2016

Status: Fixed (was: Assigned)
fix is in the CQ https://codereview.chromium.org/2577063002/
Thanks for fix!
Ok. Our frontend development process is similar with regular web development process, it means if it doesn't work for us then our users have the same problem. They can't just revert patch locally.
My question is: why infrastructure was ripped out by revert? What is right way to revert something in V8?

Sign in to add a comment