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

Issue 27140002: Use Dart_InstanceIsSubtypeOf to check if instance is a direct subtype of specified type. (Closed)

Created:
7 years, 2 months ago by siva
Modified:
7 years, 2 months ago
Reviewers:
vsm, rmacnak
CC:
reviews+dom_dartlang.org
Visibility:
Public.

Description

Use Dart_InstanceIsSubtypeOf to check if instance is a direct subtype of specified type. Improves couple of dromaeo benchmarks: dom-modify appendChild runs-per-second from 882.0 to 1373.0 dom-modify insertBefore runs-per-second from 589.0 to 1111.0

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -20 lines) Patch
M Source/bindings/dart/DartDOMWrapper.h View 2 chunks +6 lines, -6 lines 2 comments Download
M Source/bindings/dart/DartUtilities.cpp View 3 chunks +5 lines, -5 lines 1 comment Download
M Source/bindings/dart/custom/DartBlobCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/dart/custom/DartCanvasRenderingContext2DCustom.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/dart/custom/DartDOMStringListCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/dart/custom/DartHTMLOptionsCollectionCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/dart/custom/DartWebSocketCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/dart/custom/DartXMLHttpRequestCustom.cpp View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
siva
7 years, 2 months ago (2013-10-14 01:20:51 UTC) #1
vsm
https://chromiumcodereview.appspot.com/27140002/diff/1/Source/bindings/dart/DartDOMWrapper.h File Source/bindings/dart/DartDOMWrapper.h (left): https://chromiumcodereview.appspot.com/27140002/diff/1/Source/bindings/dart/DartDOMWrapper.h#oldcode171 Source/bindings/dart/DartDOMWrapper.h:171: Dart_Handle result = Dart_ObjectIsType(wrapper, type, &isInstanceOf); Siva: Just curious, ...
7 years, 2 months ago (2013-10-14 15:44:09 UTC) #2
siva
https://chromiumcodereview.appspot.com/27140002/diff/1/Source/bindings/dart/DartDOMWrapper.h File Source/bindings/dart/DartDOMWrapper.h (left): https://chromiumcodereview.appspot.com/27140002/diff/1/Source/bindings/dart/DartDOMWrapper.h#oldcode171 Source/bindings/dart/DartDOMWrapper.h:171: Dart_Handle result = Dart_ObjectIsType(wrapper, type, &isInstanceOf); Dart_InstanceIsSubtypeOf just does ...
7 years, 2 months ago (2013-10-14 15:55:05 UTC) #3
vsm
Thanks - lgtm! You may want to consider renaming Dart_InstanceIsSubtypeOf though - the different semantics ...
7 years, 2 months ago (2013-10-14 15:58:11 UTC) #4
rmacnak
On 2013/10/14 15:58:11, vsm wrote: > Thanks - lgtm! > > You may want to ...
7 years, 2 months ago (2013-10-14 17:36:19 UTC) #5
rmacnak
https://codereview.chromium.org/27140002/diff/1/Source/bindings/dart/DartUtilities.cpp File Source/bindings/dart/DartUtilities.cpp (right): https://codereview.chromium.org/27140002/diff/1/Source/bindings/dart/DartUtilities.cpp#newcode354 Source/bindings/dart/DartUtilities.cpp:354: return objectIsType(handle, type); Should we be using the new ...
7 years, 2 months ago (2013-10-14 17:37:26 UTC) #6
siva
7 years, 2 months ago (2013-10-15 17:09:07 UTC) #7
After some discussion with Regis about a proper name for this new API function I
came to the conclusion that this API function doesn't quite gel with Dart
semantics and seems like the wrong way to go about doing things.

I am closing this CL and will upload a new set of CLs which use the native class
hierarchy to do this subtype of check.

Powered by Google App Engine
This is Rietveld 408576698