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

Issue 10915015: Make fewer assumptions about the layout of api handles. (Closed)

Created:
8 years, 3 months ago by turnidge
Modified:
8 years, 3 months ago
Reviewers:
cshapiro
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Make fewer assumptions about the layout of api handles. Found these problems by changing the layout and seeing what broke. Committed: https://code.google.com/p/dart/source/detail?r=11647

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M runtime/vm/dart_api_impl.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/dart_api_state.h View 1 3 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/scavenger.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
turnidge
8 years, 3 months ago (2012-08-30 17:53:42 UTC) #1
cshapiro
lgtm https://chromiumcodereview.appspot.com/10915015/diff/1/runtime/vm/dart_api_impl.h File runtime/vm/dart_api_impl.h (right): https://chromiumcodereview.appspot.com/10915015/diff/1/runtime/vm/dart_api_impl.h#newcode116 runtime/vm/dart_api_impl.h:116: // TODO(turnidge): Assumes RawObject* is at offset zero. ...
8 years, 3 months ago (2012-08-30 18:18:55 UTC) #2
turnidge
8 years, 3 months ago (2012-08-30 18:24:30 UTC) #3
https://chromiumcodereview.appspot.com/10915015/diff/1/runtime/vm/dart_api_im...
File runtime/vm/dart_api_impl.h (right):

https://chromiumcodereview.appspot.com/10915015/diff/1/runtime/vm/dart_api_im...
runtime/vm/dart_api_impl.h:116: // TODO(turnidge): Assumes RawObject* is at
offset zero.  Fix.
On 2012/08/30 18:18:55, cshapiro wrote:
> Is there a straight forward fix?  Since the handle type is ambiguous, this
would
> require reorganizing handles so they have a similar layout.

I see us always forcing LocalHandle, PersistentHandle, and FPHandle to have a
similar layout prefix.  My only problem here is that LocalHandle hasn't been
defined yet.  To fix this, I would refactor dart_api_state.h and dart_api_impl.h
to make the handle types available at this point.  It's worth hacking up
dart_api_state.h in some way eventually I think.

Powered by Google App Engine
This is Rietveld 408576698