Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/apps/js/v8_environment.h" | 5 #include "mojo/apps/js/v8_environment.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "mojo/public/system/macros.h" | 10 #include "mojo/public/system/macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 return false; | 33 return false; |
| 34 } | 34 } |
| 35 | 35 |
| 36 const char kFlags[] = "--use_strict --harmony"; | 36 const char kFlags[] = "--use_strict --harmony"; |
| 37 | 37 |
| 38 } | 38 } |
| 39 | 39 |
| 40 void InitializeV8() { | 40 void InitializeV8() { |
| 41 v8::V8::SetArrayBufferAllocator(new ArrayBufferAllocator()); | 41 v8::V8::SetArrayBufferAllocator(new ArrayBufferAllocator()); |
| 42 v8::V8::InitializeICU(); | 42 v8::V8::InitializeICU(); |
| 43 v8::V8::SetFlagsFromString(kFlags, strlen(kFlags)); | 43 v8::V8::SetFlagsFromString(kFlags, static_cast<uint32_t>(strlen(kFlags))); |
|
viettrungluu
2013/11/08 19:02:10
I wonder if this shouldn't be using arraysize() in
jschuh
2013/11/08 19:28:12
It should, but I didn't think I could use base her
| |
| 44 v8::V8::SetEntropySource(&GenerateEntropy); | 44 v8::V8::SetEntropySource(&GenerateEntropy); |
| 45 v8::V8::Initialize(); | 45 v8::V8::Initialize(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace apps | 48 } // namespace apps |
| 49 } // mojo | 49 } // mojo |
| OLD | NEW |