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

Unified Diff: frog/value.dart

Issue 10264021: Fix codegen and isolate issues for frog dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/member_set.dart ('k') | frog/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/value.dart
diff --git a/frog/value.dart b/frog/value.dart
index 48f7efddf96d01f73684754ef71406c471b7bc2d..13e9c0547efa42ea399710700fcbfcb78aea8501 100644
--- a/frog/value.dart
+++ b/frog/value.dart
@@ -651,7 +651,7 @@ class Value {
}
// TODO(jmesserly): handle when type or toType are type parameters.
- if (toType.library == world.dom && type.library != world.dom) {
+ if (toType.library.isDomOrHtml && !type.library.isDomOrHtml) {
// TODO(jmesserly): either remove this or make it a more first class
// feature of our native interop. We shouldn't be checking for the DOM
// library--any host environment (like node.js) might need this feature
@@ -659,8 +659,10 @@ class Value {
// native code--many callbacks like List.filter are perfectly safe.
if (arity == 0) {
world.gen.corejs.useWrap0 = true;
- } else {
+ } else if (arity == 1) {
world.gen.corejs.useWrap1 = true;
+ } else if (arity == 2) {
+ world.gen.corejs.useWrap2 = true;
}
result = new Value(toType, '\$wrap_call\$$arity(${result.code})', span);
« no previous file with comments | « frog/member_set.dart ('k') | frog/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698