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

Issue 6580030: Get property may throw an exception thanks to JS accessors. (Closed)

Created:
9 years, 10 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Get property may throw an exception thanks to JS accessors. Check result before and bail out if exception has been thrown. BUG=v8:1172 TEST=test/mjsunit/regress/regress-1172-bis.js Committed: http://code.google.com/p/v8/source/detail?r=6939

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M src/ic.cc View 1 chunk +1 line, -0 lines 1 comment Download
A test/mjsunit/regress/regress-1172-bis.js View 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
antonm
Mads and Martin, tiny review for you.
9 years, 10 months ago (2011-02-24 15:47:58 UTC) #1
Martin Maly
9 years, 10 months ago (2011-02-24 17:33:49 UTC) #2
Thanks for fixing this, Anton. I remember wondering when I made the change from
Runtime::GetObjectProperty (returns MaybeObject*) to GetProperty (returhs
Handle<Object>) whether something may be different. Now re-reading
CALL_HEAP_FUNCTION it makes sense that on exception empty handle gets returned
which requires your code to propagate it out.

LGTM. Mads may want to double-check, although I am pretty sure this is the right
fix..

Thanks again
Martin

http://codereview.chromium.org/6580030/diff/1/src/ic.cc
File src/ic.cc (right):

http://codereview.chromium.org/6580030/diff/1/src/ic.cc#newcode807
src/ic.cc:807: RETURN_IF_EMPTY_HANDLE(result);
Of course ... with my recent change the exceptions were getting lost here.
Thanks for fixing it!

Powered by Google App Engine
This is Rietveld 408576698