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

Unified Diff: frog/frog.dart

Issue 8457007: Better runtime type checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged, and fix typo in member name Created 9 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
« no previous file with comments | « no previous file | frog/frogsh » ('j') | frog/lib/core.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/frog.dart
diff --git a/frog/frog.dart b/frog/frog.dart
index 5fe2e679b2d95cd54ce9ca9d9f4f3cb987de0240..415948fd020c8aa54e3cb01d72665780df2bd6e5 100644
--- a/frog/frog.dart
+++ b/frog/frog.dart
@@ -9,10 +9,16 @@
void main() {
// Get the home directory from our executable.
var homedir = path.dirname(fs.realpathSync(process.argv[1]));
- if (compile(homedir, process.argv, new NodeFileSystem())) {
+
+ // Note: we create a copy of argv here because the one that is passed in is
+ // potentially a JS Array object from outside the sandbox. Hence it will have
+ // the wrong prototype.
+ var argv = new List.from(process.argv);
jimhug 2011/11/07 16:41:26 TODO: This seems like a bug in the node interop th
Jennifer Messerly 2011/11/07 22:13:10 It's a bug in our createSandbox. We pass certain o
+
+ if (compile(homedir, argv, new NodeFileSystem())) {
var code = world.getGeneratedCode();
if (!options.compileOnly) {
- process.argv = [process.argv[0], process.argv[1]];
+ process.argv = [argv[0], argv[1]];
process.argv.addAll(options.childArgs);
vm.runInNewContext(code, createSandbox());
}
« no previous file with comments | « no previous file | frog/frogsh » ('j') | frog/lib/core.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698