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

Issue 26729002: dartium_js_interop changes

Created:
7 years, 2 months ago by Jacob
Modified:
6 years, 6 months ago
Reviewers:
vsm, justinfagnani
CC:
reviews_dartlang.org, vsm
Visibility:
Public.

Description

dartium_js_interop changes BUG=

Patch Set 1 : ready for review #

Total comments: 18

Patch Set 2 : PTAL #

Patch Set 3 : Rebased #

Total comments: 10

Patch Set 4 : Rebased and replied to comments. PTAL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -378 lines) Patch
M sdk/lib/js/dartium/js_dartium.dart View 1 2 3 1 chunk +51 lines, -374 lines 0 comments Download
M tools/dom/scripts/systemnative.py View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M tools/dom/src/native_DOMImplementation.dart View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Jacob
dart side of the native implementation of dart:js
7 years, 2 months ago (2013-10-10 23:59:55 UTC) #1
justinfagnani
https://chromiumcodereview.appspot.com/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://chromiumcodereview.appspot.com/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart#newcode15 sdk/lib/js/dartium/js_dartium.dart:15: JsObject jsify(dynamic data) native "Js_jsify"; I think we should ...
7 years, 2 months ago (2013-10-11 18:30:59 UTC) #2
Jennifer Messerly
DBC https://codereview.chromium.org/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://codereview.chromium.org/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart#newcode5 sdk/lib/js/dartium/js_dartium.dart:5: library dart.Js; did you mean to uppercase the ...
7 years, 2 months ago (2013-10-11 19:21:09 UTC) #3
vsm
DBC https://chromiumcodereview.appspot.com/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://chromiumcodereview.appspot.com/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart#newcode36 sdk/lib/js/dartium/js_dartium.dart:36: factory JsObject.fromDartObject(var object) { Perhaps fromBrowserObject? Will this ...
7 years, 2 months ago (2013-10-15 21:05:33 UTC) #4
Jacob
https://chromiumcodereview.appspot.com/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://chromiumcodereview.appspot.com/26729002/diff/10001/sdk/lib/js/dartium/js_dartium.dart#newcode5 sdk/lib/js/dartium/js_dartium.dart:5: library dart.Js; On 2013/10/11 19:21:09, John Messerly wrote: > ...
7 years, 2 months ago (2013-10-15 22:39:43 UTC) #5
justinfagnani
https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium/js_dartium.dart#newcode24 sdk/lib/js/dartium/js_dartium.dart:24: JsFunction captureThis(Function f) native "Js_captureThis"; This has moved to ...
7 years, 2 months ago (2013-10-18 01:05:47 UTC) #6
Jacob
7 years, 2 months ago (2013-10-18 21:56:24 UTC) #7
PTAL

https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium...
File sdk/lib/js/dartium/js_dartium.dart (right):

https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium...
sdk/lib/js/dartium/js_dartium.dart:24: JsFunction captureThis(Function f) native
"Js_captureThis";
On 2013/10/18 01:05:47, justinfagnani wrote:
> This has moved to the named constructor JsFunction.captureThis in my CL

Done.

https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium...
sdk/lib/js/dartium/js_dartium.dart:43: * TODO(jacobr): support Event and
NodeList as well.
On 2013/10/18 01:05:47, justinfagnani wrote:
> Window too, if we figure out what to do with other frames

Done.

https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium...
sdk/lib/js/dartium/js_dartium.dart:43: * TODO(jacobr): support Event and
NodeList as well.
On 2013/10/18 01:05:47, justinfagnani wrote:
> Window too, if we figure out what to do with other frames

Done.

https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium...
sdk/lib/js/dartium/js_dartium.dart:90: callMethod(String name, [List args])
native "JsObject_callMethod";
On 2013/10/18 01:05:47, justinfagnani wrote:
> I wonder if name should have the same type restrictions (String or num) as
other
> property names

I think name should be a string.
You can't write a JavaScript expression like

foo.3.someMethod()

so there is no need to support that here.
If you really want to call a property that is a number you call always write
foo[3].apply()
just as in JS you would have to write
foo[3]()
or foo[3].apply(...)

https://chromiumcodereview.appspot.com/26729002/diff/20001/sdk/lib/js/dartium...
sdk/lib/js/dartium/js_dartium.dart:94: apply([thisArg, List args]) native
"JsFunction_apply";
On 2013/10/18 01:05:47, justinfagnani wrote:
> I think (possibly) thisArg should either come second, or both args should be
> named. It should be very rare to use thisArg

synced offline. Made thisArg named and moved it to the second position.
Made args required.

Powered by Google App Engine
This is Rietveld 408576698