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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
index c600e9ae2cea5a01c1f015165c5a95aa57be77b5..0711b7d790a648f5ef84e533ca4339127e5a6fb5 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
@@ -393,10 +393,10 @@ class _MainManagerStub implements _ManagerStub {
* are actually available.
*/
class _WorkerStub implements _ManagerStub native "*Worker" {
- get id => JS("Object", "#.id", this);
+ get id => JS("var", "#.id", this);
void set id(i) { JS("void", "#.id = #", this, i); }
void set onmessage(f) { JS("void", "#.onmessage = #", this, f); }
- void postMessage(msg) => JS("Object", "#.postMessage(#)", this, msg);
+ void postMessage(msg) => JS("void", "#.postMessage(#)", this, msg);
// terminate() is implemented by Worker.
void terminate();
}
@@ -412,14 +412,15 @@ class _IsolateNatives {
static String get _thisScript => JS("String", r"$thisScriptUrl");
/** Starts a new worker with the given URL. */
- static _WorkerStub _newWorker(url) => JS("Object", r"new Worker(#)", url);
+ static _WorkerStub _newWorker(url) => JS("_WorkerStub", r"new Worker(#)", url);
/**
* Assume that [e] is a browser message event and extract its message data.
* We don't import the dom explicitly so, when workers are disabled, this
* library can also run on top of nodejs.
*/
- static _getEventData(e) => JS("Object", "#.data", e);
+ //static _getEventData(e) => JS("Object", "#.data", e);
+ static _getEventData(e) => JS("", "#.data", e);
/**
* Process messages on a worker, either to control the worker instance or to

Powered by Google App Engine
This is Rietveld 408576698