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

Issue 12853007: Don't throw exceptions when v8 objects/contexts are missing, and catch (Closed)

Created:
7 years, 9 months ago by not at google - send to devlin
Modified:
7 years, 9 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Don't throw exceptions when v8 objects/contexts are missing, and catch exceptions that are thrown on GC. There is a path crashing the renderer: v8 GC -> run extension function -> throws exception -> webkit tries to log -> context has been GCed -> crash. Try to avoid that. BUG=196581 R=mpcomplete@chromium.org TBR=jhawkins@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188631

Patch Set 1 #

Patch Set 2 : . #

Total comments: 5

Patch Set 3 : oops #

Patch Set 4 : . #

Patch Set 5 : use a context scope #

Patch Set 6 : context forgot to write #

Patch Set 7 : fix test #

Patch Set 8 : disable test #

Patch Set 9 : disable test #2 #

Patch Set 10 : disable test #2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -80 lines) Patch
M chrome/browser/extensions/crazy_extension_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_renderer.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/app_bindings.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
A chrome/renderer/extensions/console.h View 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/console.cc View 1 2 3 1 chunk +126 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_helper.h View 2 chunks +1 line, -8 lines 0 comments Download
M chrome/renderer/extensions/extension_helper.cc View 3 chunks +2 lines, -29 lines 0 comments Download
M chrome/renderer/extensions/miscellaneous_bindings.cc View 1 2 3 4 5 1 chunk +12 lines, -10 lines 0 comments Download
M chrome/renderer/extensions/module_system.h View 2 chunks +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/module_system.cc View 1 5 chunks +10 lines, -15 lines 0 comments Download
M chrome/renderer/extensions/object_backed_native_handler.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/crazy_extension/background.js View 1 2 3 4 5 6 7 1 chunk +4 lines, -9 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
not at google - send to devlin
7 years, 9 months ago (2013-03-15 21:59:10 UTC) #1
Matt Perry
LGTM with sadness https://codereview.chromium.org/12853007/diff/2001/chrome/renderer/extensions/console.cc File chrome/renderer/extensions/console.cc (right): https://codereview.chromium.org/12853007/diff/2001/chrome/renderer/extensions/console.cc#newcode37 chrome/renderer/extensions/console.cc:37: if (helper->dispatcher()->v8_context_set().GetByV8Context(context_)) are helper and dispatcher ...
7 years, 9 months ago (2013-03-15 22:10:27 UTC) #2
not at google - send to devlin
https://codereview.chromium.org/12853007/diff/2001/chrome/renderer/extensions/console.cc File chrome/renderer/extensions/console.cc (right): https://codereview.chromium.org/12853007/diff/2001/chrome/renderer/extensions/console.cc#newcode37 chrome/renderer/extensions/console.cc:37: if (helper->dispatcher()->v8_context_set().GetByV8Context(context_)) On 2013/03/15 22:10:27, Matt Perry wrote: > ...
7 years, 9 months ago (2013-03-15 22:19:49 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/12853007/10001
7 years, 9 months ago (2013-03-15 22:22:46 UTC) #4
commit-bot: I haz the power
Failed to trigger a try job on win_x64_rel HTTP Error 400: Bad Request
7 years, 9 months ago (2013-03-16 00:06:56 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/12853007/20001
7 years, 9 months ago (2013-03-16 00:07:35 UTC) #6
commit-bot: I haz the power
Failed to trigger a try job on mac HTTP Error 400: Bad Request
7 years, 9 months ago (2013-03-16 01:16:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/12853007/31001
7 years, 9 months ago (2013-03-16 01:16:45 UTC) #8
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=109755
7 years, 9 months ago (2013-03-16 04:17:53 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/12853007/39002
7 years, 9 months ago (2013-03-17 01:24:10 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=123566
7 years, 9 months ago (2013-03-17 02:37:42 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/12853007/61001
7 years, 9 months ago (2013-03-17 03:20:09 UTC) #12
commit-bot: I haz the power
7 years, 9 months ago (2013-03-17 09:26:02 UTC) #13
Message was sent while issue was closed.
Change committed as 188631

Powered by Google App Engine
This is Rietveld 408576698