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

Unified Diff: gin/initialize.cc

Issue 76353002: Introduce a Gin class instead of using global functions to control gin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 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 | « gin/initialize.h ('k') | gin/runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/initialize.cc
diff --git a/gin/initialize.cc b/gin/initialize.cc
deleted file mode 100644
index d95470f77309f1896d832a78945be0e80fe6c3b8..0000000000000000000000000000000000000000
--- a/gin/initialize.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "gin/initialize.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "gin/array_buffer.h"
-#include "gin/per_isolate_data.h"
-
-namespace gin {
-
-namespace {
-
-bool GenerateEntropy(unsigned char* buffer, size_t amount) {
- // TODO(abarth): Gin needs a source of entropy.
- return false;
-}
-
-const char kFlags[] = "--use_strict --harmony";
-
-}
-
-void Initialize() {
- v8::V8::SetArrayBufferAllocator(ArrayBufferAllocator::SharedInstance());
- v8::V8::InitializeICU();
- v8::V8::SetFlagsFromString(kFlags,
- static_cast<uint32_t>(arraysize(kFlags)) - 1);
- v8::V8::SetEntropySource(&GenerateEntropy);
- v8::V8::Initialize();
-
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope handle_scope(isolate);
- new PerIsolateData(isolate);
-}
-
-} // namespace gin
« no previous file with comments | « gin/initialize.h ('k') | gin/runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698