Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Issue 1504763004: [DevTools] Fix frontend host race and assert. (Closed)

Created:
5 years ago by dgozman
Modified:
5 years ago
Reviewers:
pfeldman
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, caseq+blink_chromium.org, pfeldman+blink_chromium.org, jam, lushnikov+blink_chromium.org, blink-reviews-api_chromium.org, blink-reviews, dglazkov+blink, darin-cc_chromium.org, devtools-reviews_chromium.org, mkwst+moarreviews-renderer_chromium.org, blink-reviews-bindings_chromium.org, apavlov+blink_chromium.org, sergeyv+blink_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DevTools] Fix frontend host race and assert. When quickly reloading DevTools, on-load messages from frontend like Console.enable are dispatched from both page loads, but only the last batch (from the last reload) should be dispatched. Otherwise, backend sees messages with the same id, and frontend receives multiple responses, some of them even before load producing "dispatchMessage is undefined" error. Also, reloading frontend violates an assert in DevToolsHost.cpp because of no proper cleanup in WebDevToolsFrontendImpl. Drive-by: cleaning up WebDevToolsFrontend and DevToolsHost API. BUG=566929 Committed: https://crrev.com/5c7f1ac926777bcae556dad72be6c45842e564bf Cr-Commit-Position: refs/heads/master@{#363726}

Patch Set 1 #

Total comments: 6

Patch Set 2 : documentObjectCleared #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -76 lines) Patch
M chrome/browser/devtools/devtools_ui_bindings.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/devtools/devtools_ui_bindings.cc View 1 5 chunks +16 lines, -2 lines 0 comments Download
M content/renderer/devtools/devtools_client.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/devtools/devtools_client.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp View 1 chunk +0 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/DevToolsHost.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/DevToolsHost.cpp View 1 chunk +0 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/DevToolsHost.idl View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp View 2 chunks +3 lines, -10 lines 0 comments Download
M third_party/WebKit/public/web/WebDevToolsFrontend.h View 1 chunk +1 line, -8 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
dgozman
Take a look please.
5 years ago (2015-12-07 21:30:00 UTC) #3
pfeldman
https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc#newcode897 chrome/browser/devtools/devtools_ui_bindings.cc:897: if (agent_host_.get() && !frontend_reattaching_) When does this happen and ...
5 years ago (2015-12-07 21:38:42 UTC) #4
dgozman
https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc#newcode897 chrome/browser/devtools/devtools_ui_bindings.cc:897: if (agent_host_.get() && !frontend_reattaching_) On 2015/12/07 21:38:42, pfeldman wrote: ...
5 years ago (2015-12-07 21:46:40 UTC) #5
pfeldman
https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc#newcode897 chrome/browser/devtools/devtools_ui_bindings.cc:897: if (agent_host_.get() && !frontend_reattaching_) But how can it be ...
5 years ago (2015-12-07 21:48:36 UTC) #6
dgozman
https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/1504763004/diff/1/chrome/browser/devtools/devtools_ui_bindings.cc#newcode897 chrome/browser/devtools/devtools_ui_bindings.cc:897: if (agent_host_.get() && !frontend_reattaching_) On 2015/12/07 21:48:36, pfeldman wrote: ...
5 years ago (2015-12-07 22:03:53 UTC) #8
dgozman
PTAL
5 years ago (2015-12-08 00:35:03 UTC) #9
pfeldman
lgtm
5 years ago (2015-12-08 00:36:19 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1504763004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1504763004/20001
5 years ago (2015-12-08 01:36:42 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years ago (2015-12-08 03:56:54 UTC) #14
commit-bot: I haz the power
5 years ago (2015-12-08 03:57:47 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5c7f1ac926777bcae556dad72be6c45842e564bf
Cr-Commit-Position: refs/heads/master@{#363726}

Powered by Google App Engine
This is Rietveld 408576698