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

Issue 8746005: Fix a bunch of issues with 'hidden' DOM types. (Closed)

Created:
9 years ago by Jennifer Messerly
Modified:
9 years ago
Reviewers:
jimhug, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix a bunch of issues with 'hidden' DOM types. Hidden DOM types are types whose prototype is not accessible until you have an instance--they cannot be used at init time. Issues fixed for these types include: * "is", type assertions, and getters/setters are now inserted on the prototype lazily * now patches correct prototype when binding these * handles incompatible hidden native overloads (rare in practice, but we have a test case for it) Also some other type check fixes: * Type checks handle false correctly * Dart TypeError is now used (before--would pick up the JS one) * TypeError has an actually usable error message These last fixes cause some code bloat (lots of type check fallbacks on Object.prototype), but for right now I think it's more important to give good errors. Committed: https://code.google.com/p/dart/source/detail?r=1916

Patch Set 1 #

Patch Set 2 : removed dead code #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+2134 lines, -1669 lines) Patch
M frog/corejs.dart View 6 chunks +97 lines, -44 lines 0 comments Download
frog/frogsh View 655 chunks +1824 lines, -1409 lines 0 comments Download
M frog/gen.dart View 13 chunks +45 lines, -50 lines 0 comments Download
M frog/lib/corelib.dart View 2 chunks +16 lines, -12 lines 2 comments Download
M frog/lib/natives.dart View 1 chunk +45 lines, -46 lines 0 comments Download
M frog/member.dart View 1 chunk +1 line, -1 line 0 comments Download
M frog/type.dart View 4 chunks +6 lines, -7 lines 0 comments Download
M frog/value.dart View 7 chunks +42 lines, -19 lines 0 comments Download
M frog/var_member.dart View 1 4 chunks +56 lines, -77 lines 0 comments Download
M tests/language/language.status View 2 chunks +0 lines, -4 lines 0 comments Download
M tests/language/src/NativeClassIsCheck1FrogTest.dart View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/src/NativeClassIsCheck2FrogTest.dart View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Jennifer Messerly
tbr
9 years ago (2011-11-30 06:16:59 UTC) #1
sra1
http://codereview.chromium.org/8746005/diff/1001/frog/lib/corelib.dart File frog/lib/corelib.dart (right): http://codereview.chromium.org/8746005/diff/1001/frog/lib/corelib.dart#newcode95 frog/lib/corelib.dart:95: this.destType = destType; BUG: dstType vs destType. You should ...
9 years ago (2011-11-30 23:12:49 UTC) #2
Jennifer Messerly
9 years ago (2011-12-01 00:38:07 UTC) #3
http://codereview.chromium.org/8746005/diff/1001/frog/lib/corelib.dart
File frog/lib/corelib.dart (right):

http://codereview.chromium.org/8746005/diff/1001/frog/lib/corelib.dart#newcode95
frog/lib/corelib.dart:95: this.destType = destType;
On 2011/11/30 23:12:49, sra1 wrote:
> BUG: dstType vs destType.
> 
> You should add a test that checks the TypeError has the expected content in
it's
> message.

Good catch! Hopefully we can make this entire method non-native, once
$typeNameOf is fixed and the strange issue with colliding TypeError types is
fixed.

BTW -- feel free to just check in fixes for one liners like this. :)

Powered by Google App Engine
This is Rietveld 408576698