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

Issue 678393002: Send extension console messages to the right WebFrame. (Closed)

Created:
6 years, 1 month ago by msimonides
Modified:
6 years, 1 month ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Send extension console messages to the right WebFrame. The extensions::console::ByContextFinder's conditions are tightened so that the correct RenderView is found for a given v8::Context. This fixes the problem where console messages may be sent to an incorrect document (e.g. background page instead of the options page). BUG=427922 Committed: https://crrev.com/15c088458a1e6bf4f315f7b61f1b153a5ca1d60d Cr-Commit-Position: refs/heads/master@{#303824}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Find the correct RenderView for extension logging. #

Total comments: 1

Patch Set 3 : Use WebLocalFrame::frameForContext instead of ByContextFinder. #

Patch Set 4 : Add an automated test. #

Patch Set 5 : Fix the conditions in ByContextFinder. #

Total comments: 14

Patch Set 6 : Review fixes. #

Patch Set 7 : Rebase #

Patch Set 8 : Add the missing copyright notice. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -5 lines) Patch
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/uncaught_exception_logging/content_script.js View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/uncaught_exception_logging/extension_page.html View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/uncaught_exception_logging/extension_page.js View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/uncaught_exception_logging/manifest.json View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js View 1 2 3 4 5 6 7 1 chunk +49 lines, -0 lines 0 comments Download
M extensions/renderer/console.cc View 1 2 3 4 5 6 1 chunk +5 lines, -3 lines 0 comments Download
A extensions/renderer/console_apitest.cc View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (8 generated)
msimonides
6 years, 1 month ago (2014-10-28 15:11:47 UTC) #2
not at google - send to devlin
Nice catch. https://codereview.chromium.org/678393002/diff/1/extensions/renderer/resources/uncaught_exception_handler.js File extensions/renderer/resources/uncaught_exception_handler.js (right): https://codereview.chromium.org/678393002/diff/1/extensions/renderer/resources/uncaught_exception_handler.js#newcode8 extensions/renderer/resources/uncaught_exception_handler.js:8: window.console.error(message); The use of console rather than ...
6 years, 1 month ago (2014-10-28 16:00:41 UTC) #3
msimonides
On 2014/10/28 16:00:41, kalman wrote: > These messages are supposed to be going via blink ...
6 years, 1 month ago (2014-10-29 08:44:42 UTC) #4
not at google - send to devlin
On 2014/10/29 08:44:42, msimonides wrote: > On 2014/10/28 16:00:41, kalman wrote: > > > These ...
6 years, 1 month ago (2014-10-29 18:18:01 UTC) #5
msimonides
On 2014/10/29 18:18:01, kalman wrote: > On 2014/10/29 08:44:42, msimonides wrote: > > On 2014/10/28 ...
6 years, 1 month ago (2014-10-30 14:49:38 UTC) #6
not at google - send to devlin
> > Precisely. Turns out the logs would go to the _generated_background_page.html > (it actually ...
6 years, 1 month ago (2014-10-30 14:53:40 UTC) #7
msimonides
On 2014/10/30 14:53:40, kalman wrote: > Ok, thanks. I wonder if it's just a matter ...
6 years, 1 month ago (2014-10-31 09:33:55 UTC) #8
not at google - send to devlin
On 2014/10/31 09:33:55, msimonides wrote: > On 2014/10/30 14:53:40, kalman wrote: > > > Ok, ...
6 years, 1 month ago (2014-10-31 16:41:34 UTC) #9
msimonides
On 2014/10/31 16:41:34, kalman wrote: > On 2014/10/31 09:33:55, msimonides wrote: > > On 2014/10/30 ...
6 years, 1 month ago (2014-10-31 17:02:18 UTC) #10
not at google - send to devlin
> Are you sure this ever worked correctly? If there's just a single extension > ...
6 years, 1 month ago (2014-10-31 17:09:47 UTC) #12
adamk
On 2014/10/31 at 17:09:47, kalman wrote: > > Are you sure this ever worked correctly? ...
6 years, 1 month ago (2014-11-04 23:57:13 UTC) #13
msimonides
On 2014/11/04 23:57:13, adamk wrote: > > I feel like I dropped into the middle ...
6 years, 1 month ago (2014-11-05 15:02:18 UTC) #14
not at google - send to devlin
Yeah maybe addMessageToConsole should take a v8::Context as an argument? A bit awkward to be ...
6 years, 1 month ago (2014-11-05 18:23:35 UTC) #15
msimonides
On 2014/11/05 18:23:35, kalman wrote: > Yeah maybe addMessageToConsole should take a v8::Context as an ...
6 years, 1 month ago (2014-11-06 07:55:45 UTC) #16
not at google - send to devlin
On 2014/11/06 07:55:45, msimonides wrote: > On 2014/11/05 18:23:35, kalman wrote: > > Yeah maybe ...
6 years, 1 month ago (2014-11-06 16:57:49 UTC) #17
msimonides
On 2014/11/06 16:57:49, kalman wrote: > Ok - forget everything I've been saying here. I ...
6 years, 1 month ago (2014-11-07 07:45:05 UTC) #18
not at google - send to devlin
Alright, patchset 2 lgtm :) https://codereview.chromium.org/678393002/diff/20001/extensions/renderer/console.cc File extensions/renderer/console.cc (right): https://codereview.chromium.org/678393002/diff/20001/extensions/renderer/console.cc#newcode47 extensions/renderer/console.cc:47: script_context->web_frame()->view()) == render_view) { ...
6 years, 1 month ago (2014-11-07 16:24:03 UTC) #19
msimonides
On 2014/11/07 16:24:03, kalman wrote: > Alright, patchset 2 lgtm :) > > https://codereview.chromium.org/678393002/diff/20001/extensions/renderer/console.cc > ...
6 years, 1 month ago (2014-11-07 17:46:15 UTC) #20
not at google - send to devlin
lgtm https://codereview.chromium.org/678393002/diff/80001/chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js File chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js (right): https://codereview.chromium.org/678393002/diff/80001/chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js#newcode3 chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js:3: chrome.debugger.onEvent.addListener(function(debuggee, method, params) { Also nice to remove ...
6 years, 1 month ago (2014-11-11 00:50:26 UTC) #21
msimonides
https://codereview.chromium.org/678393002/diff/80001/chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js File chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js (right): https://codereview.chromium.org/678393002/diff/80001/chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js#newcode3 chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js:3: chrome.debugger.onEvent.addListener(function(debuggee, method, params) { On 2014/11/11 00:50:25, kalman wrote: ...
6 years, 1 month ago (2014-11-12 07:41:01 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678393002/100001
6 years, 1 month ago (2014-11-12 07:50:46 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/80400) win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/85315) android_arm64_dbg_recipe ...
6 years, 1 month ago (2014-11-12 07:53:49 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678393002/120001
6 years, 1 month ago (2014-11-12 12:02:11 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/23673)
6 years, 1 month ago (2014-11-12 12:05:23 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678393002/140001
6 years, 1 month ago (2014-11-12 12:09:15 UTC) #32
commit-bot: I haz the power
Committed patchset #8 (id:140001)
6 years, 1 month ago (2014-11-12 13:15:18 UTC) #33
commit-bot: I haz the power
6 years, 1 month ago (2014-11-12 13:15:56 UTC) #34
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/15c088458a1e6bf4f315f7b61f1b153a5ca1d60d
Cr-Commit-Position: refs/heads/master@{#303824}

Powered by Google App Engine
This is Rietveld 408576698