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

Issue 10837066: Fixing crash in V8ValueConverter. (Closed)

Created:
8 years, 4 months ago by eaugusti
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, mihaip-chromium-reviews_chromium.org, jam, darin-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Fixing crash in V8ValueConverter. It appears that the crash occurs when the V8ValueConverter is passed an object that has a named callback (v8::Object::HasRealNamedCallbackProperty()) that is an internal property (something that is not defined in JS, but intercepted by the c++ side). Something like a DOM input element is a good example of this. The crash doesn't happen with every object that has internal properties and named callbacks, but so far I am unable to figure out how to programatically differentiate between the ones that will crash and the ones that won't. My current solution is to not convert any named callback. BUG=139933 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150035

Patch Set 1 #

Total comments: 6

Patch Set 2 : Cleaner #

Patch Set 3 : Getters again #

Total comments: 2

Patch Set 4 : No getters #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -3 lines) Patch
M chrome/test/data/extensions/api_test/executescript/callback/test.html View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/executescript/callback/test.js View 2 chunks +14 lines, -2 lines 0 comments Download
M content/renderer/v8_value_converter_impl.cc View 1 2 3 1 chunk +10 lines, -1 line 0 comments Download
M content/renderer/v8_value_converter_impl_unittest.cc View 1 2 3 3 chunks +30 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Aaron Boodman
https://chromiumcodereview.appspot.com/10837066/diff/1/content/renderer/v8_value_converter_impl.cc File content/renderer/v8_value_converter_impl.cc (right): https://chromiumcodereview.appspot.com/10837066/diff/1/content/renderer/v8_value_converter_impl.cc#newcode323 content/renderer/v8_value_converter_impl.cc:323: if (!key->IsString() || Would be more clear like: // ...
8 years, 4 months ago (2012-08-02 18:13:44 UTC) #1
not at google - send to devlin
https://chromiumcodereview.appspot.com/10837066/diff/1/chrome/test/data/extensions/api_test/executescript/callback/test.js File chrome/test/data/extensions/api_test/executescript/callback/test.js (right): https://chromiumcodereview.appspot.com/10837066/diff/1/chrome/test/data/extensions/api_test/executescript/callback/test.js#newcode160 chrome/test/data/extensions/api_test/executescript/callback/test.js:160: chrome.test.assertTrue(scriptVal[0] != null); drive-by: should this be a V8UnitTest?
8 years, 4 months ago (2012-08-02 18:59:41 UTC) #2
eaugusti
https://chromiumcodereview.appspot.com/10837066/diff/1/chrome/test/data/extensions/api_test/executescript/callback/test.js File chrome/test/data/extensions/api_test/executescript/callback/test.js (right): https://chromiumcodereview.appspot.com/10837066/diff/1/chrome/test/data/extensions/api_test/executescript/callback/test.js#newcode160 chrome/test/data/extensions/api_test/executescript/callback/test.js:160: chrome.test.assertTrue(scriptVal[0] != null); On 2012/08/02 18:59:41, kalman wrote: > ...
8 years, 4 months ago (2012-08-02 19:44:53 UTC) #3
asargent_no_longer_on_chrome
LGTM
8 years, 4 months ago (2012-08-03 19:35:22 UTC) #4
not at google - send to devlin
(responding to bug) I'm not comfortable lging this because it's Aaron's review, and I think ...
8 years, 4 months ago (2012-08-03 19:38:55 UTC) #5
not at google - send to devlin
Sorry, I note that you've said in your CL description that it *does* still allow ...
8 years, 4 months ago (2012-08-03 19:40:11 UTC) #6
eaugusti
On 2012/08/03 19:40:11, kalman wrote: > Sorry, I note that you've said in your CL ...
8 years, 4 months ago (2012-08-03 19:42:59 UTC) #7
eaugusti
Ok, now we have getters again for objects that do not have internal fields.
8 years, 4 months ago (2012-08-03 20:42:55 UTC) #8
Aaron Boodman
LGTM, but before landing, please put it back to just skipping all getters. I'd rather ...
8 years, 4 months ago (2012-08-04 11:34:18 UTC) #9
Aaron Boodman
On 2012/08/03 19:38:55, kalman wrote: > So yeah, would loop detection in the conversion be ...
8 years, 4 months ago (2012-08-04 11:36:12 UTC) #10
eaugusti
https://chromiumcodereview.appspot.com/10837066/diff/2003/content/renderer/v8_value_converter_impl.cc File content/renderer/v8_value_converter_impl.cc (right): https://chromiumcodereview.appspot.com/10837066/diff/2003/content/renderer/v8_value_converter_impl.cc#newcode325 content/renderer/v8_value_converter_impl.cc:325: val->HasRealNamedCallbackProperty(key->ToString())) On 2012/08/04 11:34:19, Aaron Boodman wrote: > Please ...
8 years, 4 months ago (2012-08-04 19:10:37 UTC) #11
jamesr
lgtm
8 years, 4 months ago (2012-08-04 19:26:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eaugusti@chromium.org/10837066/11002
8 years, 4 months ago (2012-08-04 19:31:21 UTC) #13
commit-bot: I haz the power
8 years, 4 months ago (2012-08-05 00:30:13 UTC) #14
Change committed as 150035

Powered by Google App Engine
This is Rietveld 408576698