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

Issue 12328064: Remove duplication and unnecessary HandleScope from HasElement helper functions (Closed)

Created:
7 years, 10 months ago by adamk
Modified:
7 years, 10 months ago
CC:
v8-dev
Visibility:
Public.

Description

Remove duplication and unnecessary HandleScope from HasElement helper functions Committed: https://code.google.com/p/v8/source/detail?r=13736

Patch Set 1 #

Total comments: 3

Patch Set 2 : Added test for StringWithCharacterAt #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -15 lines) Patch
M src/objects.cc View 2 chunks +7 lines, -15 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
adamk
7 years, 10 months ago (2013-02-22 21:59:25 UTC) #1
rossberg
https://codereview.chromium.org/12328064/diff/1/src/objects.cc File src/objects.cc (left): https://codereview.chromium.org/12328064/diff/1/src/objects.cc#oldcode3373 src/objects.cc:3373: // Handle [] on String objects. I'm not sure ...
7 years, 10 months ago (2013-02-25 10:46:25 UTC) #2
Michael Starzinger
The removal of the HandleScope itself looks good. https://codereview.chromium.org/12328064/diff/1/src/objects.cc File src/objects.cc (left): https://codereview.chromium.org/12328064/diff/1/src/objects.cc#oldcode3373 src/objects.cc:3373: // ...
7 years, 10 months ago (2013-02-25 14:29:08 UTC) #3
rossberg
On 2013/02/25 14:29:08, Michael Starzinger wrote: > The removal of the HandleScope itself looks good. ...
7 years, 10 months ago (2013-02-25 14:43:40 UTC) #4
Michael Starzinger
On 2013/02/25 14:43:40, rossberg wrote: > On 2013/02/25 14:29:08, Michael Starzinger wrote: > > The ...
7 years, 10 months ago (2013-02-25 14:51:35 UTC) #5
adamk
https://codereview.chromium.org/12328064/diff/1/src/objects.cc File src/objects.cc (left): https://codereview.chromium.org/12328064/diff/1/src/objects.cc#oldcode3373 src/objects.cc:3373: // Handle [] on String objects. On 2013/02/25 10:46:25, ...
7 years, 10 months ago (2013-02-25 19:36:03 UTC) #6
rossberg
On 2013/02/25 19:36:03, adamk wrote: > https://codereview.chromium.org/12328064/diff/1/src/objects.cc > File src/objects.cc (left): > > https://codereview.chromium.org/12328064/diff/1/src/objects.cc#oldcode3373 > ...
7 years, 10 months ago (2013-02-26 12:01:45 UTC) #7
adamk
On 2013/02/26 12:01:45, rossberg wrote: > On 2013/02/25 19:36:03, adamk wrote: > > https://codereview.chromium.org/12328064/diff/1/src/objects.cc > ...
7 years, 10 months ago (2013-02-26 16:19:30 UTC) #8
rossberg
On 2013/02/26 16:19:30, adamk wrote: > On 2013/02/26 12:01:45, rossberg wrote: > > On 2013/02/25 ...
7 years, 10 months ago (2013-02-26 16:36:22 UTC) #9
adamk
[resending to capture this on the codereview] The call sequence is: JSReceiver::HasElement JSObject::GetElementAttributeWithReceiver JSObject::GetElementAttributeWithoutInterceptor GetElementAttributeWithoutInterceptor() ...
7 years, 10 months ago (2013-02-26 16:47:15 UTC) #10
rossberg
7 years, 10 months ago (2013-02-26 17:00:15 UTC) #11
On 2013/02/26 16:47:15, adamk wrote:
> [resending to capture this on the codereview]
> 
> The call sequence is:
> 
> JSReceiver::HasElement
> JSObject::GetElementAttributeWithReceiver
> JSObject::GetElementAttributeWithoutInterceptor
> 
> GetElementAttributeWithoutInterceptor() does two things:
> 
> 1. Check if the index is present in the element backing store
> 2. If not, check if this is a string object with a character at that index
> 
> The call sequence for "'0' in o" is:
> 
> JSReceiver::HasProperty
> JSObject::GetPropertyAttribute
> JSObject::GetPropertyAttributeWithReceiver
> JSObject::GetElementAttributeWithReceiver
> JSObject::GetElementAttributeWithoutInterceptor
> 
> I think I shot myself in the foot here by removing the HandleScope from
> GetElementAttributeWithoutInterceptor in the same change, which obscures the
> fact that its call to IsStringObjectWithCharacterAt remains unchanged.

Oh. You are right, I _was_ confused. :) In that case, LGTM

Powered by Google App Engine
This is Rietveld 408576698