Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

expando thing on jsValue for jsArray #16

Merged
merged 3 commits into from
Sep 25, 2015

Conversation

dam0vm3nt
Copy link
Contributor

As suggested by @jakemac53 this will fix auto notification support for jsArray.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@dam0vm3nt
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@@ -21,13 +21,19 @@ abstract class JsProxyInterface {
JsObject get jsProxy;
}

Expando<JsArray> jsArrayExpando = new Expando<JsArray>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make this private

@jakemac53
Copy link
Contributor

@sigmundch What do you think about this? The primary risk here is if the two lists could get out of sync there is no way to recover from it, since the JsArray is now permanently tied to the Dart List.

@sigmundch
Copy link

mmm interesting - it's a valid concern. Wouldn't you run into other issues if you get out of sync, even without this?

I also have a couple questions:

  • do you think we should do the same thing for Maps?
  • should we also do this on the way back when we convert to Dart (set the expando in dartValue when we first create a Dart list for an existing JsArray)?

if (newList==null) {
newList = new JsArray.from(dartValue.map((item) => jsValue(item)));
jsArrayExpando[dartValue] = newList;
}
addDartInstance(newList, dartValue);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be addDartInstance should be pulled inside if statement.

@jakemac53
Copy link
Contributor

do you think we should do the same thing for Maps?

Yes, otherwise it would be inconsistent. @dam0vm3nt can you add that into this PR?

should we also do this on the way back when we convert to Dart (set the expando in dartValue when we first create a Dart list for an existing JsArray)?

A bit riskier, but I still think we should. @dam0vm3nt can you do this as well?

@dam0vm3nt
Copy link
Contributor Author

done. check it out.

@jakemac53
Copy link
Contributor

Nice, can you also resolve the CLA issue? I think the problem is that your git commits are using a different email than your github account.

@dam0vm3nt
Copy link
Contributor Author

Nice, can you also resolve the CLA issue? I think the problem is that your git commits are using a different email than your github account.

I've added the email address to my github account, don't know if this is sufficient...

@googlebot
Copy link

CLAs look good, thanks!

@dam0vm3nt
Copy link
Contributor Author

Ok, googlebot just answered :)

jakemac53 added a commit that referenced this pull request Sep 25, 2015
expando thing on jsValue for jsArray
@jakemac53 jakemac53 merged commit cbef534 into dart-archive:0.2.0-dev Sep 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants