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

Issue 10911063: Fix some corner cases in skipping native methods using caller. (Closed)

Created:
8 years, 3 months ago by Erik Corry
Modified:
8 years, 3 months ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

Fix some corner cases in skipping native methods using caller. Committed: https://code.google.com/p/v8/source/detail?r=12439

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -0 lines) Patch
M src/accessors.cc View 1 chunk +3 lines, -0 lines 2 comments Download
A test/mjsunit/regress/regress-145201.js View 1 chunk +107 lines, -0 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Erik Corry
8 years, 3 months ago (2012-09-04 12:28:11 UTC) #1
Yang
LGTM with comments addressed. https://chromiumcodereview.appspot.com/10911063/diff/1/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/10911063/diff/1/src/accessors.cc#newcode754 src/accessors.cc:754: while (potential_caller != NULL && ...
8 years, 3 months ago (2012-09-04 12:43:57 UTC) #2
Erik Corry
https://chromiumcodereview.appspot.com/10911063/diff/1/src/accessors.cc File src/accessors.cc (right): https://chromiumcodereview.appspot.com/10911063/diff/1/src/accessors.cc#newcode754 src/accessors.cc:754: while (potential_caller != NULL && potential_caller->IsBuiltin()) { On 2012/09/04 ...
8 years, 3 months ago (2012-09-05 07:22:33 UTC) #3
Yang
8 years, 3 months ago (2012-09-05 07:24:52 UTC) #4
On 2012/09/05 07:22:33, Erik Corry wrote:
> https://chromiumcodereview.appspot.com/10911063/diff/1/src/accessors.cc
> File src/accessors.cc (right):
> 
>
https://chromiumcodereview.appspot.com/10911063/diff/1/src/accessors.cc#newco...
> src/accessors.cc:754: while (potential_caller != NULL &&
> potential_caller->IsBuiltin()) {
> On 2012/09/04 12:43:57, Yang wrote:
> > This suggest that potential_caller can become NULL, in which case setting
> caller
> > to potential_caller would cause NULL dereference later.
> 
> I think it can't happen, but I will check for NULL before setting caller to
> potential_caller.
> 
>
https://chromiumcodereview.appspot.com/10911063/diff/1/test/mjsunit/regress/r...
> File test/mjsunit/regress/regress-145201.js (right):
> 
>
https://chromiumcodereview.appspot.com/10911063/diff/1/test/mjsunit/regress/r...
> test/mjsunit/regress/regress-145201.js:67: if (/native/i.test(caller) ||
> /ADD/.test(caller)) {
> On 2012/09/04 12:43:57, Yang wrote:
> > Why do we only test for /ADD/, not for e.g. /MUL/?
> 
> If we ever change the stringification of native functions so that the word
> 'native' does not appear, then this test would stop working (always pass). 
> Testing for a specific function that should not appear is a safeguard against
> that.

lgtm

Powered by Google App Engine
This is Rietveld 408576698