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

Issue 10837088: Implement spawnDomFunction (Closed)

Created:
8 years, 4 months ago by vsm
Modified:
8 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement spawnDomFunction Removed the spawnDomIsolate in favor of spawnDomFunction. The signature of this function matches spawnFunction. Committed: https://code.google.com/p/dart/source/detail?r=10474

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Fixes for dart2js #

Patch Set 4 : Fix return type #

Total comments: 2

Patch Set 5 : Fix test #

Total comments: 9

Patch Set 6 : Address comments #

Patch Set 7 : Regen dart:html #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -52 lines) Patch
M lib/dom/src/native_DOMImplementation.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/dom/src/native_DOMPublic.dart View 1 2 3 4 5 1 chunk +1 line, -9 lines 0 comments Download
M lib/dom/templates/html/dart2js/html_dart2js.darttemplate View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M lib/html/dart2js/html_dart2js.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 2 chunks +2 lines, -10 lines 0 comments Download
M tests/html/dom_isolates_test.dart View 1 2 3 4 5 1 chunk +30 lines, -28 lines 0 comments Download
M tests/html/html.status View 1 2 3 4 5 3 chunks +0 lines, -3 lines 0 comments Download
M tests/html/js_interop_4_test.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
vsm
8 years, 4 months ago (2012-08-03 05:26:32 UTC) #1
Anton Muhin
Why we're dropping window argument? https://chromiumcodereview.appspot.com/10837088/diff/7001/tests/html/dom_isolates_test.dart File tests/html/dom_isolates_test.dart (right): https://chromiumcodereview.appspot.com/10837088/diff/7001/tests/html/dom_isolates_test.dart#newcode58 tests/html/dom_isolates_test.dart:58: // test('Masked local function', ...
8 years, 4 months ago (2012-08-03 13:16:00 UTC) #2
vsm
Re window argument to spawnDomFunction, I was mirroring the spawnFunction API. - Do we have ...
8 years, 4 months ago (2012-08-03 15:20:44 UTC) #3
Siggi Cherem (dart-lang)
lgtm About window: one option we have discussed was to make 'spawnDomFunction' a method in ...
8 years, 4 months ago (2012-08-03 17:30:57 UTC) #4
Anton Muhin
Regarding window argument. I don't think I am aware of any use cases, but you ...
8 years, 4 months ago (2012-08-07 12:55:29 UTC) #5
vsm
On 2012/08/07 12:55:29, Anton Mukhin wrote: > Regarding window argument. BTW, what are your thoughts ...
8 years, 4 months ago (2012-08-08 16:59:36 UTC) #6
Anton Muhin
lgtm w/ my comments addressed or answered :) Regarding security model. SOP looks like a ...
8 years, 4 months ago (2012-08-09 16:39:56 UTC) #7
vsm
8 years, 4 months ago (2012-08-10 00:06:43 UTC) #8
thanks, landing.

https://chromiumcodereview.appspot.com/10837088/diff/10001/lib/dom/src/native...
File lib/dom/src/native_DOMPublic.dart (right):

https://chromiumcodereview.appspot.com/10837088/diff/10001/lib/dom/src/native...
lib/dom/src/native_DOMPublic.dart:6: spawnDomFunction(Function topLevelFunction)
{
On 2012/08/07 12:55:29, Anton Muhin wrote:
> nit: arrow syntax, please

Done.

https://chromiumcodereview.appspot.com/10837088/diff/10001/tests/html/dom_iso...
File tests/html/dom_isolates_test.dart (right):

https://chromiumcodereview.appspot.com/10837088/diff/10001/tests/html/dom_iso...
tests/html/dom_isolates_test.dart:12: replyTo.send(42);
Good point.  I changed it because it's no longer 'about:blank'.  I'll keep and
compare with the main isolate's window.location instead.

On 2012/08/07 12:55:29, Anton Muhin wrote:
> why it's 42?  Intent of window.location.toString() (which should have been
> '${window.location}' was to check DOM API is working in child isolate.

https://chromiumcodereview.appspot.com/10837088/diff/10001/tests/html/dom_iso...
tests/html/dom_isolates_test.dart:41: var sendPort =
spawnDomFunction(isolateMainTrampoline);
On 2012/08/07 12:55:29, Anton Muhin wrote:
> do you need sendPort at all? 
> spawnDomFunction(isolateMainTrampoline).call('check')... ?  Ditto for test
> above.

Done.

https://chromiumcodereview.appspot.com/10837088/diff/10001/tests/html/dom_iso...
tests/html/dom_isolates_test.dart:46: });
I'll add in a separate CL.

On 2012/08/03 17:30:57, sigmund wrote:
> one more case to test would be a static method in a class (which is valid,
just
> like top-level functions). AFAIK, that doesn't work today in dart2js.

Powered by Google App Engine
This is Rietveld 408576698