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

Unified Diff: src/d8.cc

Issue 14927014: Enable harmony_typed_arrays for shared build of d8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 92f2dd79ff1caf9a0205d2bb98e4130835d7a064..9f2d53254e0b649bda2f9367014e1c6ac6ce5b21 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -2166,12 +2166,26 @@ int Shell::RunMain(Isolate* isolate, int argc, char* argv[]) {
return 0;
}
Michael Starzinger 2013/05/13 16:27:35 nit: Add a second empty newline.
+#ifdef V8_SHARED
+static void EnableHarmonyTypedArraysViaCommandLine() {
+ int fake_argc = 2;
+ char **fake_argv = new char*[2];
+ fake_argv[0] = NULL;
+ fake_argv[1] = strdup("--harmony-typed-arrays");
+ v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false);
+ free(fake_argv[1]);
+ delete[] fake_argv;
+}
+#endif
+
int Shell::Main(int argc, char* argv[]) {
if (!SetOptions(argc, argv)) return 1;
#ifndef V8_SHARED
i::FLAG_harmony_array_buffer = true;
i::FLAG_harmony_typed_arrays = true;
+#else
+ EnableHarmonyTypedArraysViaCommandLine();
#endif
int result = 0;
Isolate* isolate = Isolate::GetCurrent();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698