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

Side by Side Diff: gin/isolate_holder.cc

Issue 290273004: Don't pass --harmony-promises flag from gin to v8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gin/public/isolate_holder.h" 5 #include "gin/public/isolate_holder.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 22 matching lines...) Expand all
33 return; 33 return;
34 } 34 }
35 v8_is_initialized = true; 35 v8_is_initialized = true;
36 v8_is_gin_managed = gin_managed; 36 v8_is_gin_managed = gin_managed;
37 if (!gin_managed) 37 if (!gin_managed)
38 return; 38 return;
39 39
40 v8::V8::InitializePlatform(V8Platform::Get()); 40 v8::V8::InitializePlatform(V8Platform::Get());
41 v8::V8::SetArrayBufferAllocator(ArrayBufferAllocator::SharedInstance()); 41 v8::V8::SetArrayBufferAllocator(ArrayBufferAllocator::SharedInstance());
42 if (mode == gin::IsolateHolder::kStrictMode) { 42 if (mode == gin::IsolateHolder::kStrictMode) {
43 static const char v8_flags[] = "--use_strict --harmony_promises"; 43 static const char v8_flags[] = "--use_strict";
44 v8::V8::SetFlagsFromString(v8_flags, sizeof(v8_flags) - 1); 44 v8::V8::SetFlagsFromString(v8_flags, sizeof(v8_flags) - 1);
45 } 45 }
46 v8::V8::SetEntropySource(&GenerateEntropy); 46 v8::V8::SetEntropySource(&GenerateEntropy);
47 v8::V8::Initialize(); 47 v8::V8::Initialize();
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 IsolateHolder::IsolateHolder(ScriptMode mode) 52 IsolateHolder::IsolateHolder(ScriptMode mode)
53 : isolate_owner_(true) { 53 : isolate_owner_(true) {
(...skipping 20 matching lines...) Expand all
74 isolate_->Dispose(); 74 isolate_->Dispose();
75 } 75 }
76 76
77 void IsolateHolder::Init(v8::ArrayBuffer::Allocator* allocator) { 77 void IsolateHolder::Init(v8::ArrayBuffer::Allocator* allocator) {
78 v8::Isolate::Scope isolate_scope(isolate_); 78 v8::Isolate::Scope isolate_scope(isolate_);
79 v8::HandleScope handle_scope(isolate_); 79 v8::HandleScope handle_scope(isolate_);
80 isolate_data_.reset(new PerIsolateData(isolate_, allocator)); 80 isolate_data_.reset(new PerIsolateData(isolate_, allocator));
81 } 81 }
82 82
83 } // namespace gin 83 } // namespace gin
OLDNEW
« 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